fluent/fluent-logger-java

RawSocketSender.send() should check connection

jklap opened this issue · 2 comments

Currently FluentLogger.log() calls RawSocketSender.emit() which calls RawSocketSender.send().

If the connection to fluentd fails for a long enough period of time that the pendings ByteBuffer fills up then RawSocketSender.send() will complain about the full buffer and then return.

This means it will never attempt to reconnect to fluentd as the reconnect attempt happens after the return.

I believe that send() should append the new message if the buffer has space, drop it on the floor if the buffer is full but in either case should continue to the reconnect check.

Oh, you're right... We'll fix this issue later. Thanks @jklap

Fixed this issue. See #27.