websrv_lib: one case of cleaner exit.

One rare case, where a module is destructed upon python interpreter exit,
and we need to check.

bzr revid: p_christ@hol.gr-20100726093334-cgirmmldh2mgvovm
This commit is contained in:
P. Christeas
2010-07-26 12:33:34 +03:00
parent ea4bb98140
commit 041f949bcc
+2
View File
@@ -399,6 +399,8 @@ class ConnThreadingMixIn:
def _handle_request_noblock(self):
"""Start a new thread to process the request."""
if not threading: # happens while quitting python
return
t = threading.Thread(target = self._handle_request2)
if self.daemon_threads:
t.setDaemon (1)