From 9917869191ecc00f6ac060fabe3cd4470bebbfab Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Thu, 22 Jun 2017 14:30:56 -0700 Subject: Not sending messages to closed websocket connections (#99) I believe this should be a safe change since the timer function nop is only ever run after the websocket is initialized. This works around potential issues in the websocket layer after we close the connection and hopefully addresses https://b.corp.google.com/issues/62363018x --- Firebase/Database/Realtime/FWebSocketConnection.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Firebase/Database') diff --git a/Firebase/Database/Realtime/FWebSocketConnection.m b/Firebase/Database/Realtime/FWebSocketConnection.m index d728bdd..c4ead9e 100644 --- a/Firebase/Database/Realtime/FWebSocketConnection.m +++ b/Firebase/Database/Realtime/FWebSocketConnection.m @@ -163,7 +163,7 @@ } - (void) nop:(NSTimer *)timer { - if(self.webSocket) { + if (!isClosed) { FFLog(@"I-RDB083004", @"(wsc:%@) nop", self.connectionId); [self.webSocket send:@"0"]; } -- cgit v1.2.3