[Jython-checkins] jython: Always attempt to shutdown server socket thread pool when closed. Completes
jim.baker
jython-checkins at python.org
Wed Feb 24 01:26:15 EST 2016
https://hg.python.org/jython/rev/08b7720fd321
changeset: 7912:08b7720fd321
user: Jim Baker <jim.baker at rackspace.com>
date: Tue Feb 23 23:26:09 2016 -0700
summary:
Always attempt to shutdown server socket thread pool when closed. Completes #2471
Although adding the corresponding listener can produces noisy tests
(in test_socket) due to finalization racing with thread pool shutdown,
it also ensures these thread pools are in fact cleaned up.
See https://github.com/netty/netty/issues/2166 - perhaps we can
control logging to remove this noise in stderr.
files:
Lib/_socket.py | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/Lib/_socket.py b/Lib/_socket.py
--- a/Lib/_socket.py
+++ b/Lib/_socket.py
@@ -1058,8 +1058,7 @@
return
close_future = self.channel.close()
- if close_future.isSuccess():
- close_future.addListener(self._finish_closing)
+ close_future.addListener(self._finish_closing)
def _finish_closing(self, _):
if self.socket_type == SERVER_SOCKET:
--
Repository URL: https://hg.python.org/jython
More information about the Jython-checkins
mailing list