Skip to content

Commit

Permalink
fix: cleanup server
Browse files Browse the repository at this point in the history
  • Loading branch information
trs committed Jun 26, 2017
1 parent 58b9d8d commit e0b11ff
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/index.js
Expand Up @@ -47,17 +47,13 @@ class FtpServer {

this.server = (this.isTLS ? tls : net).createServer(serverOptions, serverConnectionHandler);
this.server.on('error', err => this.log.error(err, '[Event] error'));
if (this.isTLS) {
this.server.on('tlsClientError', err => this.log.error(err, '[Event] tlsClientError'));
}
this.on = this.server.on.bind(this.server);
this.once = this.server.once.bind(this.server);
this.listeners = this.server.listeners.bind(this.server);

process.on('SIGTERM', () => this.close());
process.on('SIGINT', () => this.close());
process.on('SIGBREAK', () => this.close());
process.on('SIGHUP', () => this.close());
process.on('SIGQUIT', () => this.close());
}

get isTLS() {
Expand Down

0 comments on commit e0b11ff

Please sign in to comment.