change socket error listener to just use length
This commit is contained in:
parent
4e4fcfc642
commit
832a1dcc1e
1 changed files with 1 additions and 1 deletions
|
@ -125,7 +125,7 @@ app.callback = function(){
|
|||
return function(req, res){
|
||||
var ctx = new self.Context(self, req, res);
|
||||
|
||||
if (!~ctx.socket.listeners('error').indexOf(onerror)) {
|
||||
if (!ctx.socket.listeners('error').length) {
|
||||
ctx.socket.on('error', onerror);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue