Do exponential backoff for all exceptions in VMService::defaultOpenChannel. (#16785)
We were trying to only catch WebSocketException, but in fact SocketException can be thrown as well.
This commit is contained in:
@@ -53,7 +53,7 @@ Future<StreamChannel<String>> _defaultOpenChannel(Uri uri) async {
|
||||
attempts += 1;
|
||||
try {
|
||||
socket = await io.WebSocket.connect(uri.toString());
|
||||
} on io.WebSocketException catch(e) {
|
||||
} catch (e) {
|
||||
printTrace('Exception attempting to connect to observatory: $e');
|
||||
printTrace('This was attempt #$attempts. Will retry in $delay.');
|
||||
await new Future<Null>.delayed(delay);
|
||||
|
||||
Reference in New Issue
Block a user