Skip to content
Snippets Groups Projects
Commit a091de8d authored by Christophe Simonis's avatar Christophe Simonis
Browse files

[FIX] core: no traceback when closing socket.

Closes 5057
parent 21d3be87
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,10 @@ def close_socket(sock):
try:
sock.shutdown(socket.SHUT_RDWR)
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
# causing an error 57 'Socket is not connected' on shutdown
# of the other side (or something), see
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment