binding this is better for garbage collection.
This commit is contained in:
parent
f6bd9e7832
commit
fdfd13b98f
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue