[ https://issues.apache.org/jira/browse/THRIFT-2488?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Bannister updated THRIFT-2488: ------------------------------------ Affects Version/s: 0.9.1 > Timeouts can leave client in unrecoverable state > ------------------------------------------------ > > Key: THRIFT-2488 > URL: https://issues.apache.org/jira/browse/THRIFT-2488 > Project: Thrift > Issue Type: Bug > Components: Go - Library > Affects Versions: 0.9.1 > Reporter: Chris Bannister > Attachments: testcase.go, timeout.thrift > > > If you set the timeout on a TSocket and experience a timeout the client will > stop reading the struct and return the error as expected. > But if you use the TSocket again after the remote system has sent the > timedout data and the client has received it the client will be unusable > because it ends up in a state with incorrect sequence-ids and unexpected data > in its buffer. > This means that the TSocket should be closed if there is any network level > error when reading/writing. > This can also be fixed by making more attempts to read/write when the error > is a net.Error and err.Temporary() is true. Could also do something where the > client is persistently reading from the socket and discards out of order > messages or handle out of order sequences. > Test case to show the failures attached -- This message was sent by Atlassian JIRA (v6.2#6252)