From ff2f5fa4b1f196e3fb73173275fe7c49f0d5e68e Mon Sep 17 00:00:00 2001 From: Yuki Ito Date: Thu, 28 Dec 2017 13:03:49 +0900 Subject: [PATCH] Fix tcp + tls degradation https://github.com/fluent/fluentd/pull/1729 introduced @buffer to TCPCallbackSocket. TLSCallbackSocket also has to have it to be used for in_tcp. --- lib/fluent/plugin_helper/server.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/fluent/plugin_helper/server.rb b/lib/fluent/plugin_helper/server.rb index a6c1313b49..9e6d85b519 100644 --- a/lib/fluent/plugin_helper/server.rb +++ b/lib/fluent/plugin_helper/server.rb @@ -446,9 +446,12 @@ def write(data) class TLSCallbackSocket < CallbackSocket ENABLED_EVENTS = [:data, :write_complete, :close] + attr_accessor :buffer + def initialize(sock) super("tls", sock, ENABLED_EVENTS) @peeraddr = (@sock.to_io.peeraddr rescue PEERADDR_FAILED) + @buffer = '' end def write(data)