Skip to content
This repository was archived by the owner on Jun 25, 2025. It is now read-only.

Commit d41538d

Browse files
committed
fix: upload may cause stack overflow
1 parent b6c2419 commit d41538d

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

shadowsocks-csharp/Proxy/Handler.cs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1615,7 +1615,19 @@ private void PipeConnectionReceiveCallback(IAsyncResult ar)
16151615
var send_len = RemoteSend(connetionRecvBuffer, bytesRead);
16161616
if (!(send_len == 0 && bytesRead > 0))
16171617
{
1618-
doConnectionRecv();
1618+
Task.Run(() =>
1619+
{
1620+
try
1621+
{
1622+
doConnectionRecv();
1623+
}
1624+
catch (Exception ex)
1625+
{
1626+
local_error = true;
1627+
LogException(ex);
1628+
Close();
1629+
}
1630+
});
16191631
}
16201632
}
16211633
else

0 commit comments

Comments
 (0)