Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

…ortable across node.js versions
  • Loading branch information...
commit b78b2f95ad33518370d91585792ca9bd6d388007 1 parent 4a18b80
@dhruvbird authored
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) {
Please sign in to comment.
Something went wrong with that request. Please try again.