Changeset 845
- Timestamp:
- 11/28/05 11:47:21
- Files:
-
- trunk/cherrypy/_cpwsgiserver.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cherrypy/_cpwsgiserver.py
r843 r845 12 12 monthname = [None, 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 13 13 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'] 14 15 import errno 16 socket_errors_to_ignore = [] 17 # Not all of these names will be defined for every platform. 18 for _ in ("EPIPE", "ETIMEDOUT", "ECONNREFUSED", "ECONNRESET", 19 "EHOSTDOWN", "EHOSTUNREACH", 20 "WSAECONNABORTED", "WSAECONNREFUSED", "WSAECONNRESET", 21 "WSAENETRESET", "WSAETIMEDOUT"): 22 if _ in dir(errno): 23 socket_errors_to_ignore.append(getattr(errno, _)) 24 # de-dupe the list 25 socket_errors_to_ignore = dict.fromkeys(socket_errors_to_ignore).keys() 14 26 15 27 … … 158 170 except socket.error, e: 159 171 errno = e.args[0] 160 if errno in (32, 104, 113, 10053, 10054): 161 # Client probably closed the connection before the 162 # response was sent. 172 if errno in socket_errors_to_ignore: 163 173 pass 164 174 else:

