suppressing log when trying to send on closing websocket

Tento commit je obsažen v:
tigerbot 2017-04-26 17:37:52 -06:00
rodič e5e6f0bd02
revize 59763ed49e

Zobrazit soubor

@ -239,10 +239,14 @@ function run(copts) {
try {
wstunneler.send(msg, {binary: true});
} catch (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);
}
}
}
}
};
function connect() {