Skip to content
Browse files

Set agent to false instead of setting maxSockets since this is more p…

…ortable across node.js versions
  • Loading branch information...
1 parent 4a18b80 commit b78b2f95ad33518370d91585792ca9bd6d388007 @dhruvbird committed Mar 23, 2012
Showing with 6 additions and 8 deletions.
  1. +6 −8 strophe/XMLHttpRequest.js
View
14 strophe/XMLHttpRequest.js
@@ -180,15 +180,13 @@ exports.XMLHttpRequest = function() {
// Use the proper protocol
var doRequest = ssl ? https.request : http.request;
- // Increase the number of simultaneous sockets to 512.
- (ssl ? https : http).globalAgent.maxSockets = 512;
-
var options = {
- host: host,
- port: port,
- path: uri,
- method: settings.method,
- headers: headers
+ host: host,
+ port: port,
+ path: uri,
+ method: settings.method,
+ headers: headers,
+ agent: false
};
var req = doRequest(options, function(res) {

0 comments on commit b78b2f9

Please sign in to comment.
Something went wrong with that request. Please try again.