From ce8d518166a7ab8785d863a6e1bc644c20bdf570 Mon Sep 17 00:00:00 2001 From: Jens Geyer Date: Sat, 7 Dec 2013 00:08:37 +0100 Subject: [PATCH] THRIFT-2280 TJSONProtocol.Flush() does not really flush the transport Patch: Jens Geyer --- lib/go/thrift/json_protocol.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/go/thrift/json_protocol.go b/lib/go/thrift/json_protocol.go index 957d8ed8..5a432c38 100644 --- a/lib/go/thrift/json_protocol.go +++ b/lib/go/thrift/json_protocol.go @@ -442,7 +442,11 @@ func (p *TJSONProtocol) ReadBinary() ([]byte, error) { } func (p *TJSONProtocol) Flush() (err error) { - return NewTProtocolException(p.writer.Flush()) + err = p.writer.Flush() + if err == nil { + err = p.trans.Flush() + } + return NewTProtocolException(err) } func (p *TJSONProtocol) Skip(fieldType TType) (err error) { -- 2.17.1