Skip to content

Commit e1cc780

Browse files
authored
Update lib/_http_agent.js
1 parent 2b386b3 commit e1cc780

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/_http_agent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ Agent.prototype.keepSocketAlive = function keepSocketAlive(socket) {
478478
const keepAliveHint = socket._httpMessage.res.headers['keep-alive'];
479479

480480
if (keepAliveHint) {
481-
const hint = keepAliveHint.exec(/^timeout=(\d+)/)?.[1];
481+
const hint = /^timeout=(\d+)/.exec(keepAliveHint)?.[1];
482482

483483
if (hint) {
484484
const serverHintTimeout = NumberParseInt(hint) * 1000;

0 commit comments

Comments
 (0)