Browse Source

fix errno

auth
clowwindy 11 years ago
parent
commit
476738d273
  1. 4
      shadowsocks/eventloop.py

4
shadowsocks/eventloop.py

@ -230,5 +230,5 @@ def errno_from_exception(e):
# from tornado
def get_sock_error(sock):
errno = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
return socket.error(errno, os.strerror(errno))
error_number = sock.getsockopt(socket.SOL_SOCKET, socket.SO_ERROR)
return socket.error(error_number, os.strerror(error_number))

Loading…
Cancel
Save