mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-04-20 15:55:49 -04:00
Merge pull request #82 from vbanos/websock-tcp-nodely
Use TCP_NODELAY in websocket connection to improve performance
This commit is contained in:
commit
0e17205e17
@ -162,7 +162,8 @@ class WebsockReceiverThread(threading.Thread):
|
||||
# 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)
|
||||
self.websock.run_forever(sockopt=((socket.IPPROTO_TCP, socket.TCP_NODELAY, 1),),
|
||||
ping_timeout=0.5)
|
||||
|
||||
def _on_message(self, websock, message):
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user