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() {
|
function startServer() {
|
||||||
var self = this;
|
|
||||||
this.log(
|
this.log(
|
||||||
'starting server on ',this.path,
|
'starting server on ',this.path,
|
||||||
((this.port)?`:${this.port}`:'')
|
((this.port)?`:${this.port}`:'')
|
||||||
|
@ -290,13 +289,13 @@ function startServer() {
|
||||||
this.server.on(
|
this.server.on(
|
||||||
'error',
|
'error',
|
||||||
function(err){
|
function(err){
|
||||||
self.log('server error',err);
|
this.log('server error',err);
|
||||||
|
|
||||||
self.publish(
|
this.publish(
|
||||||
'error',
|
'error',
|
||||||
err
|
err
|
||||||
);
|
);
|
||||||
}
|
}.bind(this)
|
||||||
);
|
);
|
||||||
|
|
||||||
this.server.maxConnections=this.config.maxConnections;
|
this.server.maxConnections=this.config.maxConnections;
|
||||||
|
|
Loading…
Reference in a new issue