mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-06-20 12:54: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)
|
brozzler.thread_raise(self.calling_thread, BrowsingException)
|
||||||
|
|
||||||
def run(self):
|
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):
|
def _on_message(self, websock, message):
|
||||||
try:
|
try:
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -32,7 +32,7 @@ def find_package_data(package):
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='brozzler',
|
name='brozzler',
|
||||||
version='1.1b9.dev173',
|
version='1.1b9.dev174',
|
||||||
description='Distributed web crawling with browsers',
|
description='Distributed web crawling with browsers',
|
||||||
url='https://github.com/internetarchive/brozzler',
|
url='https://github.com/internetarchive/brozzler',
|
||||||
author='Noah Levitt',
|
author='Noah Levitt',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue