Skip to content

Commit

Permalink
feat: set hostname to listen on
Browse files Browse the repository at this point in the history
By default, `net.Server` listens on `0.0.0.0`, which is any available address. This ensures that ftp-srv only listens on the set hostname.
  • Loading branch information
trs committed May 18, 2018
1 parent 414433a commit cc0f2a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Expand Up @@ -65,7 +65,7 @@ class FtpServer extends EventEmitter {
this.url.hostname = hostname;
return new Promise((resolve, reject) => {
this.server.once('error', reject);
this.server.listen(this.url.port, err => {
this.server.listen(this.url.port, this.url.hostname, err => {
this.server.removeListener('error', reject);
if (err) return reject(err);
this.log.info({
Expand Down

0 comments on commit cc0f2a5

Please sign in to comment.