diff --git a/lib/fluent/plugin_helper/server.rb b/lib/fluent/plugin_helper/server.rb index dcc8e406fa..7c58e7a381 100644 --- a/lib/fluent/plugin_helper/server.rb +++ b/lib/fluent/plugin_helper/server.rb @@ -523,7 +523,7 @@ def initialize(sock, max_bytes, flags, close_socket, log, under_plugin_developme def on_readable_without_sock begin data = @sock.recv(@max_bytes, @flags) - rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::EINTR, Errno::ECONNRESET + rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::EINTR, Errno::ECONNRESET, IOError, Errno::EBADF return end @callback.call(data) @@ -536,7 +536,7 @@ def on_readable_without_sock def on_readable_with_sock begin data, addr = @sock.recvfrom(@max_bytes) - rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::EINTR, Errno::ECONNRESET + rescue Errno::EAGAIN, Errno::EWOULDBLOCK, Errno::EINTR, Errno::ECONNRESET, IOError, Errno::EBADF return end @callback.call(data, UDPCallbackSocket.new(@sock, addr, close_socket: @close_socket))