From c138b433d8429a943b47e4c388cd136b39f172e1 Mon Sep 17 00:00:00 2001 From: "which.linden" Date: Wed, 25 Jun 2008 11:53:37 -0700 Subject: [PATCH] [svn r131] Fix for some SwitchingToDeadGreenlet or TypeError: '_socketobject' object is not iterable exceptions: Passing both read=True and write=True to trampoline would cause the fd to select as both readable and writable in some error conditions. This would cause the greenlet to be spuriously resumed a second time. (commit comment stolen from donovan) --- eventlet/wrappedfd.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eventlet/wrappedfd.py b/eventlet/wrappedfd.py index 9175fdd..0cdebac 100644 --- a/eventlet/wrappedfd.py +++ b/eventlet/wrappedfd.py @@ -154,13 +154,13 @@ class wrapped_fd(object): client, addr = res util.set_nonblocking(client) return type(self)(client), addr - trampoline(fd, read=True, write=True) + trampoline(fd, read=True) def connect(self, address): fd = self.fd connect = util.socket_connect while not connect(fd, address): - trampoline(fd, read=True, write=True) + trampoline(fd, write=True) recv = higher_order_recv(util.socket_recv)