Skip to content

Commit 7285c5b

Browse files
Fixed: shashwat001#4 Balanced the params in on_close function
1 parent 30151bd commit 7285c5b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ def handleJsonMessage(self, message, jsonObj, ws):
253253
def on_error(self, ws, error):
254254
logging.info(error)
255255

256-
def on_close(self):
256+
def on_close(self,ws):
257257
logging.info("### closed ###")
258258
if self.keepAliveTimer is not None:
259259
self.keepAliveTimer.cancel()
@@ -289,7 +289,7 @@ def connect(self, connectionType="takeover"):
289289
self.ws = websocket.WebSocketApp("wss://web.whatsapp.com/ws",
290290
on_message=lambda ws, msg: self.on_message(ws, msg),
291291
on_error=lambda ws, msg: self.on_error(ws, msg),
292-
on_close=lambda ws: self.on_close(),
292+
on_close=lambda ws: self.on_close(ws),
293293
on_open=lambda ws: self.on_open(ws),
294294
header={"Origin: https://web.whatsapp.com"})
295295
self.refreshConnectionTimer = Timer(11*60*60, lambda: self.ws.close())

0 commit comments

Comments
 (0)