diff --git a/src/wormhole/server/rendezvous_websocket.py b/src/wormhole/server/rendezvous_websocket.py index a6289a7..32519b0 100644 --- a/src/wormhole/server/rendezvous_websocket.py +++ b/src/wormhole/server/rendezvous_websocket.py @@ -247,5 +247,6 @@ class WebSocketRendezvousFactory(websocket.WebSocketServerFactory): protocol = WebSocketRendezvous def __init__(self, url, rendezvous): websocket.WebSocketServerFactory.__init__(self, url) + self.setProtocolOptions(autoPingInterval=60, autoPingTimeout=600) self.rendezvous = rendezvous self.reactor = reactor # for tests to control diff --git a/src/wormhole/wormhole.py b/src/wormhole/wormhole.py index 11fbd12..c3b0c6f 100644 --- a/src/wormhole/wormhole.py +++ b/src/wormhole/wormhole.py @@ -354,6 +354,7 @@ class _Wormhole: self._ws_t = self._timing.add("open websocket") p = urlparse(self._ws_url) f = WSFactory(self._ws_url) + f.setProtocolOptions(autoPingInterval=60, autoPingTimeout=600) f.wormhole = self f.d = defer.Deferred() # TODO: if hostname="localhost", I get three factories starting