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:
parent
07a3af93ec
commit
5795e85079
@ -109,12 +109,6 @@ export class TerminalApi extends WebSocketApi {
|
||||
|
||||
reconnect() {
|
||||
const { reconnectDelaySeconds } = this.params;
|
||||
if (reconnectDelaySeconds) {
|
||||
this.emitStatus(`Reconnect in ${reconnectDelaySeconds} seconds`, {
|
||||
color: TerminalColor.YELLOW,
|
||||
showTime: true,
|
||||
});
|
||||
}
|
||||
super.reconnect();
|
||||
}
|
||||
|
||||
@ -143,11 +137,6 @@ export class TerminalApi extends WebSocketApi {
|
||||
}
|
||||
|
||||
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);
|
||||
this.isReady = false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user