Hopefully fix occasional errors when trying to send an initial banner to a frame client. After looking through ws' source, the most likely reason seems to be that the websocket is in CLOSING state. Even if not, we should get a bit more useful log output this time.

This commit is contained in:
Simo Kinnunen
2015-07-01 12:46:36 +09:00
parent 02779f648d
commit 9f627cb129
2 changed files with 57 additions and 9 deletions

View File

@@ -37,4 +37,12 @@ BroadcastSet.prototype.values = function() {
}, this)
}
BroadcastSet.prototype.keys = function() {
return Object.keys(this.set)
}
BroadcastSet.prototype.get = function(id) {
return this.set[id]
}
module.exports = BroadcastSet