expose timeout parameter for ws open

This commit is contained in:
jeffthibault
2022-07-27 12:30:53 -04:00
parent 53c524c90a
commit 29a7ed8132

View File

@@ -30,8 +30,11 @@ class Relay:
self.ws = ws
self.subscriptions = subscriptions
def open_websocket_connection(self) -> None:
self.ws.connect(self.url, timeout=1)
def open_websocket_connection(self, timeout=None) -> None:
if timeout != None:
self.ws.connect(self.url, timeout)
else:
self.ws.connect(self.url)
def close_websocket_connection(self) -> None:
self.ws.close()