changeset 10514:1426b4807fc8 stable

zeroconf: suppress traceback during shutdown If the read thred is in select when the main thread is in close, the main thread may close the socket between select and read, generating a noisy traceback. This can be ignored if the shutdown flag is set.
author Brendan Cully <brendan@kublai.com>
date Fri, 19 Feb 2010 16:50:47 -0800
parents 47838dee7d60
children 98bc3e195720
files hgext/zeroconf/Zeroconf.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/zeroconf/Zeroconf.py	Fri Feb 19 21:48:09 2010 +0100
+++ b/hgext/zeroconf/Zeroconf.py	Fri Feb 19 16:50:47 2010 -0800
@@ -863,7 +863,8 @@
 						try:
 							self.readers[socket].handle_read()
 						except:
-							traceback.print_exc()
+							if not globals()['_GLOBAL_DONE']:
+								traceback.print_exc()
 				except:
 					pass