Skip to content

Commit

Permalink
Fixes issue 84
Browse files Browse the repository at this point in the history
  • Loading branch information
TimLuq committed May 15, 2018
1 parent a794f1e commit f0791b7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ class FtpServer extends EventEmitter {
.then(hostname => {
this.url.hostname = hostname;
return new Promise((resolve, reject) => {
this.server.listen(this.url.port, err => {
this.server.once('error', reject);
this.server.listen(this.url.port, this.url.hostname, err => {
this.server.removeListener('error', reject);
if (err) return reject(err);
this.log.info({
protocol: this.url.protocol.replace(/\W/g, ''),
Expand Down

0 comments on commit f0791b7

Please sign in to comment.