diff --git a/lib/influxdb.js b/lib/influxdb.js index f7a8913..e14deb2 100644 --- a/lib/influxdb.js +++ b/lib/influxdb.js @@ -421,8 +421,7 @@ InfluxdbBackend.prototype.httpPOST_v08 = function (points) { hostname: self.host, port: self.port, path: '/db/' + self.database + '/series?' + querystring.stringify(query), - method: 'POST', - agent: false // Is it okay to use "undefined" here? (keep-alive) + method: 'POST' }; var req = self.protocol.request(options); @@ -439,6 +438,8 @@ InfluxdbBackend.prototype.httpPOST_v08 = function (points) { if (status !== 200) { self.log(protocolName + ' Error: ' + status); } + + res.on('data', function(){}); }); req.on('error', function (e, i) { @@ -476,8 +477,7 @@ InfluxdbBackend.prototype.httpPOST_v09 = function (points) { hostname: self.host, port: self.port, path: '/write?' + querystring.stringify(query), - method: 'POST', - agent: false // Is it okay to use "undefined" here? (keep-alive) + method: 'POST' }; var req = self.protocol.request(options); @@ -494,6 +494,8 @@ InfluxdbBackend.prototype.httpPOST_v09 = function (points) { if (status >= 400) { self.log(protocolName + ' Error: ' + status); } + + res.on('data', function(){}); }); req.on('error', function (e, i) {