Open BRH-Enrian opened 7 years ago
I've noticed that my completion handlers for proxy invoke calls get called twice. Here's a snippet from my code:
invoke
var counter = 0 proxy.invoke("groupdisconnect", withArgs: [roomId]) { [weak self] response, error in guard let wself = self else { return } counter += 1 wself.logger.log("leaveRoom - \(counter) res: \(response.debugDescription) err: \(error.debugDescription)") if counter == 2 { DispatchQueue.main.async { wself.logger.log("disconnecting from hub") wself.proxy = nil wself.hub?.disconnect() wself.hub = nil } } }
Here's the log lines from above:
2017-08-17 01:16:58.314 Nedbank[11425:126321] 23:16:58.314 WebSocketClient: leaveRoom - 1 res: nil err: nil 2017-08-17 01:16:58.858 Nedbank[11425:126321] 23:16:58.858 WebSocketClient: leaveRoom - 2 res: nil err: nil
So, is this normal? And why is res always nil?
res
the same question with me
try to comment out lines from 78 to 80 in "SRWEBSocketTransport" file will fix it
I've noticed that my completion handlers for proxy
invoke
calls get called twice. Here's a snippet from my code:Here's the log lines from above:
So, is this normal? And why is
res
always nil?