Skip to content

Commit

Permalink
fix: upload may cause stack overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
HMBSbige committed Nov 19, 2021
1 parent b6c2419 commit d41538d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion shadowsocks-csharp/Proxy/Handler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1615,7 +1615,19 @@ private void PipeConnectionReceiveCallback(IAsyncResult ar)
var send_len = RemoteSend(connetionRecvBuffer, bytesRead);
if (!(send_len == 0 && bytesRead > 0))
{
doConnectionRecv();
Task.Run(() =>
{
try
{
doConnectionRecv();
}
catch (Exception ex)
{
local_error = true;
LogException(ex);
Close();
}
});
}
}
else
Expand Down

0 comments on commit d41538d

Please sign in to comment.