message: feat(transport): enable keep-alives and limit number of sockets
diff: @@ -7,6 +7,10 @@ var timeoutReq = require('timed-out');
  var http = require('http');
  var https = require('https');
  +var agentOptions = { keepalive: true, maxSockets: 100 };
  +var httpAgent = new http.Agent(agentOptions);
  +var httpsAgent = new https.Agent(agentOptions);
  +
  function Transport() {}
  util.inherits(Transport, events.EventEmitter);
  @@ -14,6 +18,7 @@ function HTTPTransport(options) {
  this.defaultPort = 80;
  this.transport = http;
  this.options = options || {};
  + this.agent = httpAgent;
  }
  util.inherits(HTTPTransport, Transport);
  HTTPTransport.prototype.send = function(client, message, headers, eventId, cb) {
  @@ -23,7 +28,8 @@ HTTPTransport.prototype.send = function(client, message, headers, eventId, cb) {
  headers: headers,
  method: 'POST',
  port: client.dsn.port || this.defaultPort,
  - ca: client.ca
  + ca: client.ca,
  + agent: this.agent
  };
  for (var key in this.options) {
  if (this.options.hasOwnProperty(key)) {
  @@ -84,6 +90,7 @@ function HTTPSTransport(options) {
  this.defaultPort = 443;
  this.transport = https;
  this.options = options || {};
  + this.agent = httpsAgent;
  }
  util.inherits(HTTPSTransport, HTTPTransport);
  