Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 86909b5

Browse files
committed
rename DISCONNECTED global constant in _DISCONNECTED
1 parent 985b68e commit 86909b5

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/asyncore.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
from errno import EALREADY, EINPROGRESS, EWOULDBLOCK, ECONNRESET, EINVAL, \
5757
ENOTCONN, ESHUTDOWN, EINTR, EISCONN, EBADF, ECONNABORTED, errorcode
5858

59-
DISCONNECTED = frozenset((ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED))
59+
_DISCONNECTED = frozenset((ECONNRESET, ENOTCONN, ESHUTDOWN, ECONNABORTED))
6060

6161
try:
6262
socket_map
@@ -366,7 +366,7 @@ def send(self, data):
366366
except socket.error as why:
367367
if why.args[0] == EWOULDBLOCK:
368368
return 0
369-
elif why.args[0] in DISCONNECTED:
369+
elif why.args[0] in _DISCONNECTED:
370370
self.handle_close()
371371
return 0
372372
else:
@@ -384,7 +384,7 @@ def recv(self, buffer_size):
384384
return data
385385
except socket.error as why:
386386
# winsock sometimes throws ENOTCONN
387-
if why.args[0] in DISCONNECTED:
387+
if why.args[0] in _DISCONNECTED:
388388
self.handle_close()
389389
return b''
390390
else:

0 commit comments

Comments
 (0)