Trampolines that don't have a timeout don't need a timeout_exc.
This commit is contained in:
@@ -171,8 +171,7 @@ class GreenSocket(object):
|
|||||||
fd = self.fd
|
fd = self.fd
|
||||||
if self.gettimeout() is None:
|
if self.gettimeout() is None:
|
||||||
while not socket_connect(fd, address):
|
while not socket_connect(fd, address):
|
||||||
trampoline(fd, write=True,
|
trampoline(fd, write=True)
|
||||||
timeout_exc=socket.timeout("timed out"))
|
|
||||||
else:
|
else:
|
||||||
end = time.time() + self.gettimeout()
|
end = time.time() + self.gettimeout()
|
||||||
while True:
|
while True:
|
||||||
@@ -190,8 +189,7 @@ class GreenSocket(object):
|
|||||||
if self.gettimeout() is None:
|
if self.gettimeout() is None:
|
||||||
while not socket_connect(fd, address):
|
while not socket_connect(fd, address):
|
||||||
try:
|
try:
|
||||||
trampoline(fd, write=True,
|
trampoline(fd, write=True)
|
||||||
timeout_exc=socket.timeout(errno.EAGAIN))
|
|
||||||
except socket.error, ex:
|
except socket.error, ex:
|
||||||
return ex[0]
|
return ex[0]
|
||||||
else:
|
else:
|
||||||
@@ -304,7 +302,7 @@ class GreenSocket(object):
|
|||||||
tail += self.send(data[tail:], flags)
|
tail += self.send(data[tail:], flags)
|
||||||
|
|
||||||
def sendto(self, *args):
|
def sendto(self, *args):
|
||||||
trampoline(self.fd, write=True, timeout_exc=socket.timeout("timed out"))
|
trampoline(self.fd, write=True)
|
||||||
return self.fd.sendto(*args)
|
return self.fd.sendto(*args)
|
||||||
|
|
||||||
def setblocking(self, flag):
|
def setblocking(self, flag):
|
||||||
|
Reference in New Issue
Block a user