This commit is contained in:
Kovid Goyal 2015-03-19 12:53:32 +05:30
parent a379dd73bb
commit ae4e486410

View File

@ -139,7 +139,7 @@ class CompletionWorker(Thread):
def shutdown(self): def shutdown(self):
self.shutting_down = True self.shutting_down = True
self.main_queue.put(None) self.main_queue.put(None)
for conn in (self.control_conn, self.data_conn): for conn in (getattr(self, 'control_conn', None), getattr(self, 'data_conn', None)):
try: try:
conn.close() conn.close()
except Exception: except Exception: