|
- --- Twisted-2.1.0/twisted/internet/tcp.py Sat Oct 8 21:10:44 2005
- +++ /usr/local/lib/python2.4/site-packages/twisted/internet/tcp.py Tue Sep 5 23:33:41 2006
- @@ -43,6 +43,7 @@
- from errno import WSAEINPROGRESS as EINPROGRESS
- from errno import WSAEALREADY as EALREADY
- from errno import WSAECONNRESET as ECONNRESET
- + from errno import WSAECONNRESET as ECONNABORTED
- from errno import WSAEISCONN as EISCONN
- from errno import WSAENOTCONN as ENOTCONN
- from errno import WSAEINTR as EINTR
- @@ -55,6 +56,7 @@
- from errno import EINPROGRESS
- from errno import EALREADY
- from errno import ECONNRESET
- + from errno import ECONNABORTED
- from errno import EISCONN
- from errno import ENOTCONN
- from errno import EINTR
- @@ -752,10 +754,13 @@
- try:
- skt, addr = self.socket.accept()
- except socket.error, e:
- - if e.args[0] in (EWOULDBLOCK, EAGAIN):
- + errno = e.args[0]
- + if not isinstance(errno, type(EAGAIN)):
- + errno = errno[0]
- + if errno in (EWOULDBLOCK, EAGAIN, ECONNABORTED):
- self.numberAccepts = i
- break
- - elif e.args[0] == EPERM:
- + elif errno == EPERM:
- continue
- raise
-
|