binding this is better for garbage collection.

This commit is contained in:
Brandon Nozaki Miller 2017-05-18 14:22:56 -07:00 committed by GitHub
parent f6bd9e7832
commit fdfd13b98f

View file

@ -259,7 +259,6 @@ function serverCreated(socket) {
}
function startServer() {
var self = this;
this.log(
'starting server on ',this.path,
((this.port)?`:${this.port}`:'')
@ -290,13 +289,13 @@ function startServer() {
this.server.on(
'error',
function(err){
self.log('server error',err);
this.log('server error',err);
self.publish(
this.publish(
'error',
err
);
}
}.bind(this)
);
this.server.maxConnections=this.config.maxConnections;