Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Commit

Permalink
check unref() is supported
Browse files Browse the repository at this point in the history
unref() is added to node `0.9.1`+
  • Loading branch information
pi0 authored and TooTallNate committed May 25, 2017
1 parent 7858f43 commit fe2162e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion agent.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ Agent.prototype.addRequest = function addRequest (req, host, port, localAddress)
}
} else {
req.onSocket(socket);
socket.unref();
if (typeof socket.unref === 'function') {
socket.unref();
}
}
});
sync = false;
Expand Down

0 comments on commit fe2162e

Please sign in to comment.