Skip to content

Commit d5e1563

Browse files
committed
Merge pull request dat#8 from chyikwei/fix_socket_error
handle socket error (for issue dat#7)
2 parents ac07ac7 + c37e6d4 commit d5e1563

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ner/utils.py

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def tcpip4_socket(host, port):
2020
finally:
2121
try:
2222
s.shutdown(socket.SHUT_RDWR)
23+
except socket.error:
24+
pass
2325
except OSError:
2426
pass
2527
finally:

0 commit comments

Comments
 (0)