mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-08-08 14:32:23 -04:00
restore ping_timeout argument to WebSocketApp.run_forever to fix problem of leaking websocket receiver threads hanging forever on select()
This commit is contained in:
parent
5375b819dd
commit
d22cc075e0
2 changed files with 5 additions and 2 deletions
|
@ -157,7 +157,10 @@ class WebsockReceiverThread(threading.Thread):
|
|||
brozzler.thread_raise(self.calling_thread, BrowsingException)
|
||||
|
||||
def run(self):
|
||||
self.websock.run_forever()
|
||||
# ping_timeout is used as the timeout for the call to select.select()
|
||||
# in addition to its documented purpose, and must have a value to avoid
|
||||
# hangs in certain situations
|
||||
self.websock.run_forever(ping_timeout=0.5)
|
||||
|
||||
def _on_message(self, websock, message):
|
||||
try:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue