Skip to content

Commit d9ee79c

Browse files
committed
Merge branch 'hotfix/2.28.3'
2 parents 711363b + f5373bb commit d9ee79c

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

Diff for: backslash/contrib/keepalive_thread.py

+10-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,16 @@ def __init__(self, client, session, interval):
1515
self.daemon = True
1616

1717
def run(self):
18-
while not self._stopped_event.is_set():
19-
self._stopped_event.wait(timeout=self._interval)
20-
self._session.send_keepalive()
18+
_logger.debug('Backslash keepalive thread started')
19+
try:
20+
while not self._stopped_event.is_set():
21+
self._stopped_event.wait(timeout=self._interval)
22+
self._session.send_keepalive()
23+
except Exception: #pylint: disable=broad-except
24+
_logger.error('Quitting keepalive thread due to exception', exc_info=True)
25+
raise
26+
finally:
27+
_logger.debug('Backslash keepalive thread terminated')
2128

2229
def stop(self):
2330
self._stopped_event.set()

0 commit comments

Comments
 (0)