Skip to content

Commit

Permalink
Not sending messages to closed websocket connections (#99)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
schmidt-sebastian committed Jun 22, 2017
1 parent 0297375 commit 9917869
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Firebase/Database/Realtime/FWebSocketConnection.m
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ - (void) send:(NSDictionary *)dictionary {
}

- (void) nop:(NSTimer *)timer {
if(self.webSocket) {
if (!isClosed) {
FFLog(@"I-RDB083004", @"(wsc:%@) nop", self.connectionId);
[self.webSocket send:@"0"];
}
Expand Down

0 comments on commit 9917869

Please sign in to comment.