suppressing log when trying to send on closing websocket
This commit is contained in:
parent
e5e6f0bd02
commit
59763ed49e
|
@ -239,7 +239,11 @@ function run(copts) {
|
|||
try {
|
||||
wstunneler.send(msg, {binary: true});
|
||||
} catch (err) {
|
||||
console.warn('[sendMessage] error sending websocket message', err);
|
||||
// There is a chance that this occurred after the websocket was told to close
|
||||
// and before it finished, in which case we don't need to log the error.
|
||||
if (wstunneler.readyState !== wstunneler.CLOSING) {
|
||||
console.warn('[sendMessage] error sending websocket message', err);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue