Skip to content

Commit

Permalink
refactor: reject with Error object (#319)
Browse files Browse the repository at this point in the history
* refactor: reject with Error object

* fix: use error constructor

Co-authored-by: Matt Forster <[email protected]>
  • Loading branch information
simultsop and matt-forster authored Jun 24, 2022
1 parent 51049f6 commit 4ba5834
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class FtpServer extends EventEmitter {
delete this.connections[id];

setTimeout(() => {
reject('Timed out disconnecting client')
reject(new Error('Timed out disconnecting the client'))
}, this.options.timeout || 1000)

try {
Expand Down

0 comments on commit 4ba5834

Please sign in to comment.