1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Silence terminal websocket connection errors (#172)

Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
Jari Kolehmainen 2020-03-29 20:03:46 +03:00 committed by GitHub
parent 07a3af93ec
commit 5795e85079
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -109,12 +109,6 @@ export class TerminalApi extends WebSocketApi {
reconnect() { reconnect() {
const { reconnectDelaySeconds } = this.params; const { reconnectDelaySeconds } = this.params;
if (reconnectDelaySeconds) {
this.emitStatus(`Reconnect in ${reconnectDelaySeconds} seconds`, {
color: TerminalColor.YELLOW,
showTime: true,
});
}
super.reconnect(); super.reconnect();
} }
@ -143,11 +137,6 @@ export class TerminalApi extends WebSocketApi {
} }
protected _onClose(evt: CloseEvent) { protected _onClose(evt: CloseEvent) {
const { code, reason, wasClean } = evt;
if (code !== 1000 || !wasClean) {
this.emitStatus("\r\n");
this.emitError(`Closed by "${reason}" (code: ${code}) at ${new Date()}.`);
}
super._onClose(evt); super._onClose(evt);
this.isReady = false; this.isReady = false;
} }