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 957d8ed..5a432c3 100644
--- a/lib/go/thrift/json_protocol.go
+++ b/lib/go/thrift/json_protocol.go
@@ -442,7 +442,11 @@
 }
 
 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) {