StreamSink is closed
Closed this issue · 3 comments
lesnitsky commented
Hi,
I get this error in flutter when device goes in bad network state
Unhandled Exception: Bad state: StreamSink is closed
#0 _StreamSinkImpl.add (dart:_http/http_impl.dart:536:7)
#1 _WebSocketImpl.add (dart:_http/websocket_impl.dart:1213:11)
#2 PhoenixIoConnection.send
package:phoenix_wings/src/phoenix_io_connection.dart:37
#3 PhoenixSocket.push.<anonymous closure>
package:phoenix_wings/src/phoenix_socket.dart:221
#4 PhoenixSocket.push
package:phoenix_wings/src/phoenix_socket.dart:225
#5 PhoenixSocket.sendHeartbeat
package:phoenix_wings/src/phoenix_socket.dart:214
There is also a piece of custom logic behind, maybe you can suggest what am I doing wrong
connectivity = new Connectivity();
final connRes = await connectivity.checkConnectivity();
connectivity.onConnectivityChanged.listen((ConnectivityResult result) {
if (result == ConnectivityResult.none) {
_socket.disconnect();
onConnectionChange.value = false;
} else if (!_socket.isConnected) {
_socket.connect();
onConnectionChange.value = true;
}
});
mfeckie commented
Is this still an issue?
lesnitsky commented
Yes, it is still reproducible
…On Wed, Apr 24, 2019, 7:34 PM Martin Feckie ***@***.***> wrote:
Is this still an issue?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#11 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPYUNV6WUCLCDUELTMUSGLPSEKDXANCNFSM4G67NLIQ>
.
mfeckie commented
Should be fixed in 0.2.1