LearnBoost / soda

Selenium Node.JS adapter
http://labs.learnboost.com
464 stars 43 forks source link

Switch to new HTTP API and force use of keepalives in a socket per client #44

Open nbertram opened 12 years ago

nbertram commented 12 years ago

I made a switch from http.createClient to http.request, the new API. I also made a custom agent for each client that restricts a client to one socket, otherwise the default maxSockets of 5 means each new command to Selenium opens a new connection to the server. When dealing with Saucelabs, the Selenium server is quite a long way away, so the socket open time becomes quite significant.