Skip to content

Commit

Permalink
lib: unref the read timer in httpx.request()
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian committed Nov 23, 2023
1 parent 040e6b4 commit 1d2d5c8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ exports.request = function (url, opts) {
socket[READ_TIME_OUT] = readTimeout;
socket[READ_TIMER] = timer;
socket[READ_TIMER_START_AT] = Date.now();
// don't block the loop
timer.unref();
};

// string
Expand Down

0 comments on commit 1d2d5c8

Please sign in to comment.