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 <lewis.marshall@ably.com>
  • Loading branch information
lmars committed Aug 4, 2024
1 parent 610e305 commit c58a6a8
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 c58a6a8

Please sign in to comment.