diff --git a/src/component/internal/websocket.ts b/src/component/internal/websocket.ts index 053ad95e..d2560b55 100644 --- a/src/component/internal/websocket.ts +++ b/src/component/internal/websocket.ts @@ -53,7 +53,7 @@ export class NekoWebSocket extends EventEmitter { this._ws.onerror = rej.bind(this, new Error('connection error')) this._ws.onmessage = this.onMessage.bind(this) - let timeout = window.setTimeout(rej.bind(this, new Error('connection timeout')), connTimeout) + const timeout = window.setTimeout(rej.bind(this, new Error('connection timeout')), connTimeout) this._ws.onopen = () => { window.clearTimeout(timeout)