Skip to content

Commit

Permalink
server-helper: Fix invalid 'close' call in error
Browse files Browse the repository at this point in the history
Signed-off-by: Masahiro Nakagawa <[email protected]>
  • Loading branch information
repeatedly committed Jul 27, 2018
1 parent 2f9fde5 commit 03ae873
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/fluent/plugin_helper/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ def on_read_without_connection(data)
rescue => e
@log.error "unexpected error on reading data", host: @callback_connection.remote_host, port: @callback_connection.remote_port, error: e
@log.error_backtrace
close(true) rescue nil
close rescue nil
raise if @under_plugin_development
end

Expand All @@ -609,7 +609,7 @@ def on_read_with_connection(data)
rescue => e
@log.error "unexpected error on reading data", host: @callback_connection.remote_host, port: @callback_connection.remote_port, error: e
@log.error_backtrace
close(true) rescue nil
close rescue nil
raise if @under_plugin_development
end

Expand Down Expand Up @@ -756,7 +756,7 @@ def on_read_without_connection(data)
rescue => e
@log.error "unexpected error on reading data", host: @callback_connection.remote_host, port: @callback_connection.remote_port, error: e
@log.error_backtrace
close(true) rescue nil
close rescue nil
raise if @under_plugin_development
end

Expand All @@ -765,7 +765,7 @@ def on_read_with_connection(data)
rescue => e
@log.error "unexpected error on reading data", host: @callback_connection.remote_host, port: @callback_connection.remote_port, error: e
@log.error_backtrace
close(true) rescue nil
close rescue nil
raise if @under_plugin_development
end

Expand Down

0 comments on commit 03ae873

Please sign in to comment.