We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
SocketClient
1 parent a19958f commit 45f88f6Copy full SHA for 45f88f6
packages/graphql/lib/src/links/websocket_link/websocket_client.dart
@@ -495,7 +495,19 @@ class SocketClient {
495
.where((message) => message is SubscriptionComplete)
496
.take(1);
497
498
- subscriptionComplete.listen((_) => response.close());
+ subscriptionComplete.listen(
499
+ (_) => response.close(),
500
+ onDone: () {
501
+ if (!config.autoReconnect) {
502
+ response.close();
503
+ }
504
+ },
505
+ onError: (_) {
506
507
508
509
510
+ );
511
512
dataErrorComplete
513
.where((message) => message is SubscriptionData)
0 commit comments