summaryrefslogtreecommitdiff
path: root/client/src
diff options
context:
space:
mode:
authorVictor Shyba <victor.shyba@gmail.com>2015-09-09 14:37:58 -0300
committerVictor Shyba <victor.shyba@gmail.com>2015-09-09 14:39:59 -0300
commit1e00c9966ed2a5cb4a4b1075e450f5e1ce13f188 (patch)
tree8c148ad97a79ef01d3ffaccdc9542bc70a1ca639 /client/src
parentac3b1e9b845c1df77b08fc11ba16e870435751b8 (diff)
[bug] check threadpool state before closing it
Code is trying to close a closed threadpool. This raises errors on Twisted 15.4.
Diffstat (limited to 'client/src')
-rw-r--r--client/src/leap/soledad/client/adbapi.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/src/leap/soledad/client/adbapi.py b/client/src/leap/soledad/client/adbapi.py
index 237159bd..77822247 100644
--- a/client/src/leap/soledad/client/adbapi.py
+++ b/client/src/leap/soledad/client/adbapi.py
@@ -285,7 +285,8 @@ class U1DBConnectionPool(adbapi.ConnectionPool):
A final close, only called by the shutdown trigger.
"""
self.shutdownID = None
- self.threadpool.stop()
+ if self.threadpool.started:
+ self.threadpool.stop()
self.running = False
for conn in self.connections.values():
self._close(conn)