不要怂,就是干,撸起袖子干!

Commit 50b1c0fd by José Moreira

maintain `connection.state` instead

@mickhansen I believe that problem was occurring because
“protocol_error” is a faulty state, not a valid one.
1 parent 02941b30
Showing with 1 additions and 1 deletions
......@@ -74,7 +74,7 @@ ConnectionManager.prototype.disconnect = function(connection) {
});
};
ConnectionManager.prototype.validate = function(connection) {
return connection && ! connection._protocol._ended;
return connection && [ 'disconnected', 'protocol_error' ].indexOf( connection.state ) !== -1;
};
module.exports = ConnectionManager;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!