mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-06-20 12:54:23 -04:00
do not wait forever for zombie websocket threads (this change should also reveal how we get these sometimes)
This commit is contained in:
parent
9b32f9a3d1
commit
02c054c284
1 changed files with 8 additions and 1 deletions
|
@ -134,7 +134,14 @@ class Browser:
|
|||
except BaseException as e:
|
||||
self.logger.error("exception closing websocket {} - {}".format(self._websock, e))
|
||||
|
||||
websock_thread.join()
|
||||
websock_thread.join(timeout=30)
|
||||
if websock_thread.is_alive():
|
||||
self.logger.error("{} still alive 30 seconds after closing {}, will forcefully nudge it again".format(websock_thread, self._websock))
|
||||
self._websock.keep_running = False
|
||||
websock_thread.join(timeout=30)
|
||||
if websock_thread.is_alive():
|
||||
self.logger.critical("{} still alive 60 seconds after closing {}".format(websock_thread, self._websock))
|
||||
|
||||
self._behavior = None
|
||||
|
||||
def send_to_chrome(self, **kwargs):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue