Skip to content

Commit 940007a

Browse files
authored
Fixing issue with HttpClient no releasing native stream (#399)
1 parent babd3d7 commit 940007a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

nanoFramework.System.Net.Http/Http/System.Net._InputNetworkStreamWrapper.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,10 @@ protected override void Dispose(bool disposing)
474474
{
475475
m_InUse = false;
476476

477-
if (!m_isClone)
477+
// This has been commented because we are not closing the socket properly when using HttpClient
478+
// This is causing the socket to remain open and not be released back to the pool
479+
// This will require more testing to make sure that this does not break anything else
480+
//if (!m_isClone)
478481
{
479482
m_Stream.Close();
480483

0 commit comments

Comments
 (0)