diff --git a/lib/winston-logstash.js b/lib/winston-logstash.js index 8d02603..9f88f16 100644 --- a/lib/winston-logstash.js +++ b/lib/winston-logstash.js @@ -199,6 +199,7 @@ Logstash.prototype.connect = function () { this.socket.connect(self.port, self.host, function () { self.announce(); self.connecting = false; + self.socket.setKeepAlive(true, 60 * 1000); }); } @@ -243,4 +244,4 @@ Logstash.prototype.sendLog = function (message, callback) { Logstash.prototype.getQueueLength = function () { return this.log_queue.length; -}; \ No newline at end of file +};