You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I went through SftpClient briefly and I noticed that the reset event is only set when s.StatusCode == StatusCodes.Ok
_sftpSession.RequestWrite(handle, offset, buffer, 0, bytesRead, null, s =>
{
if (s.StatusCode == StatusCodes.Ok)
{
Interlocked.Decrement(ref expectedResponses);
responseReceivedWaitHandle.Set();
// Call callback to report number of bytes written
if (uploadCallback != null)
{
// Execute callback on different thread
ThreadAbstraction.ExecuteThread(() => uploadCallback(writtenBytes));
}
}
});
which means that
once loop reaches
// Wait for expectedResponses to change
_sftpSession.WaitOnHandle(responseReceivedWaitHandle, _operationTimeout);
and status code for all write requests != StatusCodes.Ok the loop will hang
This is not just observation I've seen it happen many times, this results in thread starvation for the host application eventually.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
I went through SftpClient briefly and I noticed that the reset event is only set when s.StatusCode == StatusCodes.Ok
which means that
once loop reaches
and status code for all write requests != StatusCodes.Ok the loop will hang
This is not just observation I've seen it happen many times, this results in thread starvation for the host application eventually.
The text was updated successfully, but these errors were encountered: