From: Jens Geyer Date: Fri, 6 Dec 2013 23:08:37 +0000 (+0100) Subject: THRIFT-2280 TJSONProtocol.Flush() does not really flush the transport X-Git-Url: https://source.supwisdom.com/gerrit/gitweb?a=commitdiff_plain;h=ce8d518166a7ab8785d863a6e1bc644c20bdf570;p=common%2Fthrift.git THRIFT-2280 TJSONProtocol.Flush() does not really flush the transport Patch: Jens Geyer --- 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) {