Created
July 18, 2015 20:15
-
-
Save rastalamm/5e68e3db2a48984189b1 to your computer and use it in GitHub Desktop.
Creating keep Alive Agent if you run into the 'EADDRNOTAVAIL' problem. (You ran out of sockets)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var keepAliveAgent = new http.Agent({ | |
keepAlive: true, | |
keepAliveMsecs : 200 }); | |
var options = { | |
hostname : HOST, | |
port : PORT, | |
method : 'POST', | |
agent : keepAliveAgent | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment