Skip to content

Commit 6868aed

Browse files
Alex BakerPere Urbon-Bayes
authored andcommitted
Fix for issue #23
Fixes #25
1 parent ced0d5f commit 6868aed

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/logstash/inputs/tcp.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ def handle_socket(socket, client_address, output_queue, codec)
157157
@logger.debug? && @logger.debug("Connection closed", :client => socket.peer)
158158
rescue Errno::ECONNRESET
159159
@logger.debug? && @logger.debug("Connection reset by peer", :client => socket.peer)
160+
rescue OpenSSL::SSL::SSLError => e
161+
# Fixes issue #23
162+
@logger.error("SSL Error", :exception => e, :backtrace => e.backtrace)
163+
socket.close rescue nil
160164
rescue => e
161165
# if plugin is stopping, don't bother logging it as an error
162166
!stop? && @logger.error("An error occurred. Closing connection", :client => socket.peer, :exception => e, :backtrace => e.backtrace)

0 commit comments

Comments
 (0)