Skip to content

Commit

Permalink
WIP don't ignore messages when WebSocket is closed
Browse files Browse the repository at this point in the history
Signed-off-by: Lewis Marshall <[email protected]>
  • Loading branch information
lmars committed Jul 25, 2024
1 parent 698b716 commit 22101b2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions Source/ARTWebSocketTransport.m
Original file line number Diff line number Diff line change
Expand Up @@ -337,11 +337,6 @@ - (ARTRealtimeTransportError *)classifyError:(NSError *)error {
- (void)webSocket:(id<ARTWebSocket>)webSocket didReceiveMessage:(id)message {
ARTLogVerbose(self.logger, @"R:%p WS:%p websocket did receive message", _delegate, self);

if (self.websocket.readyState == ARTWebSocketReadyStateClosed) {
ARTLogDebug(self.logger, @"R:%p WS:%p websocket is closed, message has been ignored", _delegate, self);
return;
}

if ([message isKindOfClass:[NSString class]]) {
[self webSocketMessageText:(NSString *)message];
} else if ([message isKindOfClass:[NSData class]]) {
Expand Down

0 comments on commit 22101b2

Please sign in to comment.