Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.9.1
-
None
-
None
Description
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