refactor: reject with Error object (#319)
* refactor: reject with Error object * fix: use error constructor Co-authored-by: Matt Forster <hey@mattforster.ca>
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user