Stop sending messages to ws connections that have errored

Fixes #708
This commit is contained in:
Nick O'Leary 2015-07-30 22:09:01 +01:00
parent 6b03379e4e
commit 5193d7bddb
1 changed files with 6 additions and 4 deletions

View File

@ -167,6 +167,8 @@ function publishTo(ws,topic,data) {
try {
ws.send(msg);
} catch(err) {
removeActiveConnection(ws);
removePendingConnection(ws);
log.warn(log._("comms.error-send",{message:err.toString()}));
}
}