Rev 4745: We don't need timeout here. in file:///home/vila/src/bzr/bugs/392127-thread-leak/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Oct 12 13:06:01 BST 2009
At file:///home/vila/src/bzr/bugs/392127-thread-leak/
------------------------------------------------------------
revno: 4745
revision-id: v.ladeuil+lp at free.fr-20091012120600-fx3suhz6s6ly1flm
parent: v.ladeuil+lp at free.fr-20091012115555-swx60t4o8jg8kekt
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 392127-thread-leak
timestamp: Mon 2009-10-12 14:06:00 +0200
message:
We don't need timeout here.
* bzrlib/tests/http_server.py:
(TestingHTTPServerMixin.serve): Get rid of the timeout, that's not
needed.
-------------- next part --------------
=== modified file 'bzrlib/tests/http_server.py'
--- a/bzrlib/tests/http_server.py 2009-10-12 11:55:55 +0000
+++ b/bzrlib/tests/http_server.py 2009-10-12 12:06:00 +0000
@@ -373,22 +373,16 @@
self.serving = threading.Event()
self.serving.set()
self.is_shut_down.clear()
- # Ensure that we will not stay blocked in listen()
- self.socket.settimeout(1)
if 'threads' in tests.selftest_debug_flags:
print 'Starting %r' % (self.server_address,)
# We are listening and ready to accept connections
started.set()
while self.serving.isSet():
- try:
- if 'threads' in tests.selftest_debug_flags:
- print 'Accepting on %r' % (self.server_address,)
- # Really a connection but the python framework is generic and
- # call them requests
- self.handle_request()
- except socket.timeout:
- # So we can check if we're asked to stop
- pass
+ if 'threads' in tests.selftest_debug_flags:
+ print 'Accepting on %r' % (self.server_address,)
+ # Really a connection but the python framework is generic and
+ # call them requests
+ self.handle_request()
if 'threads' in tests.selftest_debug_flags:
print 'Closing %r' % (self.server_address,)
# Let's close the listening socket
@@ -445,7 +439,7 @@
# still being called)
pass
# We don't have to wait for the server to shut down to start shutting
- # the clients, so let's start now.
+ # down the clients, so let's start now.
for c in self.clients:
self.shutdown_client(c)
self.clients = []
More information about the bazaar-commits
mailing list