Merge pull request #395 from dcolens/dcolens-patch-1

Fixes #393 - catch error when sending UDP packet to GELF server
This commit is contained in:
Gareth Jones 2016-07-17 17:36:08 +10:00 committed by GitHub
commit defeb2503b

View File

@ -114,9 +114,9 @@ function gelfAppender (layout, host, port, hostname, facility) {
}
function sendPacket(packet) {
try {
client.send(packet, 0, packet.length, port, host);
} catch(e) {}
client.send(packet, 0, packet.length, port, host, function(err) {
if (err) { console.error(err); }
});
}
return function(loggingEvent) {