Skip to content

Commit 7af733a

Browse files
authored
Merge pull request Automattic#15245 from hasezoey/unrefConnectionTimeout
fix(connection): unref the "_waitForConnect"
2 parents 03bb0be + 69db833 commit 7af733a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

lib/connection.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -842,6 +842,11 @@ Connection.prototype._waitForConnect = async function _waitForConnect() {
842842
},
843843
bufferTimeoutMS
844844
);
845+
846+
// dont cause this timeout to keep the js process alive
847+
if ('unref' in timeout) {
848+
timeout.unref();
849+
}
845850
})
846851
]);
847852

0 commit comments

Comments
 (0)