diff options
author | Sebastian Schmidt <mrschmidt@google.com> | 2017-06-22 14:30:56 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-22 14:30:56 -0700 |
commit | 9917869191ecc00f6ac060fabe3cd4470bebbfab (patch) | |
tree | 01af685f8e4c4e879f8dd0339c62389f96ee655b /Firebase/Database | |
parent | 0297375121c3f13a4cfe23271793990b980bddee (diff) |
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
Diffstat (limited to 'Firebase/Database')
-rw-r--r-- | Firebase/Database/Realtime/FWebSocketConnection.m | 2 |
1 files changed, 1 insertions, 1 deletions
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"]; } |