[MERGE] forward port of branch 7.0 up to a091de8
This commit is contained in:
commit
9323f2b4c7
|
@ -197,6 +197,10 @@ class CommonServer(object):
|
||||||
try:
|
try:
|
||||||
sock.shutdown(socket.SHUT_RDWR)
|
sock.shutdown(socket.SHUT_RDWR)
|
||||||
except socket.error, e:
|
except socket.error, e:
|
||||||
|
if e.errno == errno.EBADF:
|
||||||
|
# Werkzeug > 0.9.6 closes the socket itself (see commit
|
||||||
|
# https://github.com/mitsuhiko/werkzeug/commit/4d8ca089)
|
||||||
|
return
|
||||||
# On OSX, socket shutdowns both sides if any side closes it
|
# On OSX, socket shutdowns both sides if any side closes it
|
||||||
# causing an error 57 'Socket is not connected' on shutdown
|
# causing an error 57 'Socket is not connected' on shutdown
|
||||||
# of the other side (or something), see
|
# of the other side (or something), see
|
||||||
|
|
Loading…
Reference in New Issue