diff options
author | Jens Geyer <jensg@apache.org> | 2013-12-07 00:08:37 +0100 |
---|---|---|
committer | Jens Geyer <jensg@apache.org> | 2013-12-07 00:11:34 +0100 |
commit | ce8d518166a7ab8785d863a6e1bc644c20bdf570 (patch) | |
tree | 3ceb69a4283377e64066c09563e1343489c3e89e /lib/go | |
parent | 88103ca7f4c342d0e239b411f3321b0d25c0a150 (diff) | |
download | thrift-ce8d518166a7ab8785d863a6e1bc644c20bdf570.tar.gz |
THRIFT-2280 TJSONProtocol.Flush() does not really flush the transport
Patch: Jens Geyer
Diffstat (limited to 'lib/go')
-rw-r--r-- | lib/go/thrift/json_protocol.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/go/thrift/json_protocol.go b/lib/go/thrift/json_protocol.go index 957d8ed83..5a432c388 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) { |