Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
0.13.0
-
Patch Available
-
Patch, Important
Description
When I have some network issues to connect to my Thrift server, it tries many attempts to connect to it. After a while, I get a "OutOfMemory" Exception. EDIT: unrelated to this issue.
I read that it may be related to too many sockets opened.
Looking quickly at the code in .NET Standard:
TBaseClient
public virtual async Task OpenTransportAsync(CancellationToken cancellationToken)
{
if (!_inputProtocol.Transport.IsOpen)
if (!_inputProtocol.Transport.IsOpen)
{ await _outputProtocol.Transport.OpenAsync(cancellationToken); }}
This last check seems a bad copy/paste and should probably be
if (!_outputProtocol.Transport.IsOpen)
Otherwise, we indeed get the transport on the output protocol getting opened many times!
I just proposed a pull request with the fix.