Open JadKHaddad opened 1 year ago
Tracking progress on dart-lang/web_socket_channel#268
WebSocketChannel channel = WebSocketChannel.connect(
Uri.parse('ws://localhost:8000/ws'),
);
try {
await channel.ready;
} catch (e) {
print("Exception: $e");
}
Page URL
https://docs.flutter.dev/cookbook/networking/web-sockets/
Page source
https://github.com/flutter/website/tree/main/src/cookbook/networking/web-sockets.md
Describe the problem
Connection errors while establishing a connection with WebSocketChannel.connect() can't be handeled with try/catch blocks.
Expected fix
No response
Additional context
Establishing connections to a none available server causes my app to crash even though I am trying to catch the error in a try/catch block