[Jython-checkins] jython: Handle shutdown with SHUT_RDWR
darjus.loktevic
jython-checkins at python.org
Fri Nov 13 23:22:26 EST 2015
https://hg.python.org/jython/rev/e974921ae9bb
changeset: 7805:e974921ae9bb
user: Tom Alexander <tom.alexander at datastax.com>
date: Sat Nov 14 15:21:06 2015 +1100
summary:
Handle shutdown with SHUT_RDWR
files:
Lib/_socket.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Lib/_socket.py b/Lib/_socket.py
--- a/Lib/_socket.py
+++ b/Lib/_socket.py
@@ -1051,12 +1051,12 @@
def shutdown(self, how):
log.debug("Got request to shutdown socket how=%s", how, extra={"sock": self})
self._verify_channel()
- if how & SHUT_RD:
+ if how & SHUT_RD or how & SHUT_RDWR:
try:
self.channel.pipeline().remove(self.python_inbound_handler)
except NoSuchElementException:
pass # already removed, can safely ignore (presumably)
- if how & SHUT_WR:
+ if how & SHUT_WR or how & SHUT_RDWR:
self._can_write = False
def _readable(self):
--
Repository URL: https://hg.python.org/jython
More information about the Jython-checkins
mailing list