We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07f2cf8 commit 597c08fCopy full SHA for 597c08f
lib/logstash/outputs/tcp.rb
@@ -88,7 +88,7 @@ def setup_ssl
88
require "openssl"
89
90
@ssl_context = OpenSSL::SSL::SSLContext.new
91
-
+
92
if @ssl_mutual
93
@ssl_context.cert = OpenSSL::X509::Certificate.new(File.read(@ssl_cert))
94
@ssl_context.key = OpenSSL::PKey::RSA.new(File.read(@ssl_key),@ssl_key_passphrase)
@@ -166,7 +166,10 @@ def register
166
client_socket.sysread(16384) if r.any?
167
168
# Now send the payload
169
- client_socket.syswrite(payload) if w.any?
+ written = client_socket.syswrite(payload) if w.any?
170
+ while payload.length > written do
171
+ written += client_socket.syswrite(payload) if w.any?
172
+ end
173
rescue => e
174
@logger.warn("tcp output exception", :host => @host, :port => @port,
175
:exception => e, :backtrace => e.backtrace)
0 commit comments