private static void ResumeAsyncWriteCallback(AsyncProtocolRequest asyncRequest)
{
try
{
((SslStreamInternal)asyncRequest.AsyncObject).StartWriting(asyncRequest.Buffer, asyncRequest.Offset, asyncRequest.Count, asyncRequest);
}
catch (Exception e)
{
if (asyncRequest.IsUserCompleted)
{
// This will throw on a worker thread.
throw;
}
((SslStreamInternal)asyncRequest.AsyncObject)._sslState.FinishWrite();
asyncRequest.CompleteUserWithError(e);
}
}