From e2d5166e573a218b2d252a1e9a508dbec5f03ab1 Mon Sep 17 00:00:00 2001 From: Pete Brumm Date: Wed, 3 Apr 2019 16:29:28 -0500 Subject: [PATCH] fixing for tls connections --- lib/nsq/connection.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/nsq/connection.rb b/lib/nsq/connection.rb index 49f72a9..901f88e 100644 --- a/lib/nsq/connection.rb +++ b/lib/nsq/connection.rb @@ -170,7 +170,7 @@ def write_to_socket(raw) debug ">>> #{raw.inspect}" begin @socket.write_nonblock(raw) - rescue Errno::EWOULDBLOCK + rescue Errno::EWOULDBLOCK, OpenSSL::SSL::SSLErrorWaitWritable if connected? sleep 0.01 retry @@ -235,7 +235,7 @@ def receive_frame(max_receive_time = nil) data = @socket.read_nonblock(size) frame_class = frame_class_for_type(type) return frame_class.new(data, self) - rescue Errno::EWOULDBLOCK + rescue Errno::EWOULDBLOCK, OpenSSL::SSL::SSLErrorWaitReadable if break_after.nil? || break_after > Time.now sleep 0.01 retry @@ -244,7 +244,7 @@ def receive_frame(max_receive_time = nil) end end end - rescue Errno::EWOULDBLOCK + rescue Errno::EWOULDBLOCK, OpenSSL::SSL::SSLErrorWaitReadable if break_after.nil? || break_after > Time.now sleep 0.01 retry