setTimeout should use args (#1623)

This commit is contained in:
Drahcirius
2017-06-27 15:22:17 -04:00
committed by Amish Shah
parent 0a337a4646
commit 45cc175851
2 changed files with 4 additions and 4 deletions

View File

@@ -447,9 +447,9 @@ class Client extends EventEmitter {
*/
setTimeout(fn, delay, ...args) {
const timeout = setTimeout(() => {
fn();
fn(...args);
this._timeouts.delete(timeout);
}, delay, ...args);
}, delay);
this._timeouts.add(timeout);
return timeout;
}