Skip to content

Commit

Permalink
set ETIMEDOUT code on exception
Browse files Browse the repository at this point in the history
  • Loading branch information
splitice committed Sep 29, 2020
1 parent 7222f01 commit e5cb91c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/eventemitter2.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@
if (options.timeout > 0) {
timer= setTimeout(function(){
var reason= Error('timeout');
reason.code = 'ETIMEDOUT'
timer= 0;
promise.cancel(reason);
reject(reason);
Expand Down

0 comments on commit e5cb91c

Please sign in to comment.