Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.10.0
-
None
Description
The current (as of 72ca60d) pattern for TTransport factories in Golang is
type TTransportFactory interface {
GetTransport(trans TTransport) TTransport
}
This causes issues, because some TTransportFactory implementations can return and error. Consider the THttpClientTransportFactory, which as of of 72ca60d, includes the following snippet:
s, _ := NewTHttpClientWithOptions(p.url, p.options)
return s
The call to NewTHttpClientWithOptions(...) call can throw errors. The resultant behavior is that nil is returned in place of a valid TTransport, with a nil error.
The TTransportFactory interface (and associated use patterns) should be extended to include errors.
Attachments
Issue Links
- is related to
-
THRIFT-4219 Golang HTTP clients created with Nil buffer
- Closed
- links to