Skip to content

Commit 17ae3a5

Browse files
author
Ahren Stevens-Taylor
committed
Fix syswrite only pushing 16K due to TLS RFC,
Fixes: #30
1 parent 07f2cf8 commit 17ae3a5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lib/logstash/outputs/tcp.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,10 @@ def register
166166
client_socket.sysread(16384) if r.any?
167167

168168
# Now send the payload
169-
client_socket.syswrite(payload) if w.any?
169+
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
170173
rescue => e
171174
@logger.warn("tcp output exception", :host => @host, :port => @port,
172175
:exception => e, :backtrace => e.backtrace)

0 commit comments

Comments
 (0)