You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WebSocket's isConnected property is still true when the webSocketDidDisconnect delegate message is received by the client. This is kind of weird since the name implies the disconnection already happened.
It looks like 4c4495d changed it so the internal connected property wasn't set to false until after the delegate message was sent, and only refers to doDisconnect. But HEAD's implementation doesn't seem to reference that at all.
Just wondering if there's any design considerations I'm missing here or if it seems reasonable to set that property to false before calling the delegate. I'll send a PR if there are no objections.
The text was updated successfully, but these errors were encountered:
Apologizes on the delayed response, was on vacation. I have had a lot of back and forth with this, but I agree you are right, it should be set to false when didDisconnect is called and true when didConnect is called. Only thing to mention is the delegate is called from a different thread then the connected property, so a possible race condition has to be handled. PR is welcomed. Thanks!
WebSocket's
isConnected
property is stilltrue
when the webSocketDidDisconnect delegate message is received by the client. This is kind of weird since the name implies the disconnection already happened.It looks like 4c4495d changed it so the internal
connected
property wasn't set to false until after the delegate message was sent, and only refers todoDisconnect
. ButHEAD
's implementation doesn't seem to reference that at all.Just wondering if there's any design considerations I'm missing here or if it seems reasonable to set that property to false before calling the delegate. I'll send a PR if there are no objections.
The text was updated successfully, but these errors were encountered: