Skip to content

Commit

Permalink
fix(realtime_client): Accept an error on track when the server return…
Browse files Browse the repository at this point in the history
…s an error (#888)

fix: Accept an error on track when the server returns an error
  • Loading branch information
dshukertjr authored Apr 12, 2024
1 parent 1fa1586 commit f829be5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/realtime_client/lib/src/realtime_channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,11 @@ class RealtimeChannel {
completer.complete(ChannelResponse.ok);
}
});
push.receive('error', (_) {
if (!completer.isCompleted) {
completer.complete(ChannelResponse.error);
}
});
push.receive('timeout', (_) {
if (!completer.isCompleted) {
completer.complete(ChannelResponse.timedOut);
Expand Down

0 comments on commit f829be5

Please sign in to comment.