summaryrefslogtreecommitdiff
path: root/lib/go
diff options
context:
space:
mode:
authorJens Geyer <jensg@apache.org>2013-12-07 00:08:37 +0100
committerJens Geyer <jensg@apache.org>2013-12-07 00:11:34 +0100
commitce8d518166a7ab8785d863a6e1bc644c20bdf570 (patch)
tree3ceb69a4283377e64066c09563e1343489c3e89e /lib/go
parent88103ca7f4c342d0e239b411f3321b0d25c0a150 (diff)
downloadthrift-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.go6
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) {