seq-logging
Advanced tools
Comparing version 1.1.1 to 1.1.2
{ | ||
"name": "seq-logging", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "Sends structured log events to the Seq HTTP ingestion API", | ||
@@ -24,10 +24,10 @@ "keywords": [ | ||
"devDependencies": { | ||
"mocha": "^9.0.0", | ||
"node-polyfill-webpack-plugin": "^1.1", | ||
"mocha": "^9.2.2", | ||
"node-polyfill-webpack-plugin": "^1.1.4", | ||
"nyc": "^15.1.0", | ||
"simple-mock": "^0.8.0", | ||
"superagent": "^6.1.0", | ||
"uuid": "^8.3.2", | ||
"typescript": "^4.3.5" | ||
"typescript": "^4.7.4", | ||
"uuid": "^8.3.2" | ||
} | ||
} |
@@ -304,10 +304,12 @@ "use strict"; | ||
req.on("socket", (socket) => { | ||
socket.on("timeout", () => { | ||
req.abort(); | ||
if (attempts > this._maxRetries) { | ||
return reject('HTTP log shipping failed, reached timeout (' + this._requestTimeout + ' ms)') | ||
} else { | ||
return setTimeout(() => sendRequest(batch, bytes), this._retryDelay); | ||
} | ||
}) | ||
if (socket.listeners("timeout").length == 0) { | ||
socket.on("timeout", () => { | ||
req.destroy(); | ||
if (attempts > this._maxRetries) { | ||
return reject('HTTP log shipping failed, reached timeout (' + this._requestTimeout + ' ms)') | ||
} else { | ||
return setTimeout(() => sendRequest(batch, bytes), this._retryDelay); | ||
} | ||
}); | ||
} | ||
}); | ||
@@ -314,0 +316,0 @@ |
52816
945