Use status code 1000 on WebSocket hangup for compatibility.

This commit is contained in:
Richard Moore 2020-07-13 09:27:08 -04:00
parent 6039464342
commit 588f64c760
No known key found for this signature in database
GPG Key ID: 665176BE8E9DC651

@ -289,7 +289,8 @@ export class WebSocketProvider extends JsonRpcProvider {
}));
}
// Hangup (navigating away from the page that opened the connection)
this._websocket.close(1001);
// Hangup
// See: https://developer.mozilla.org/en-US/docs/Web/API/CloseEvent#Status_codes
this._websocket.close(1000);
}
}