mirror of
https://github.com/winscp/winscp.git
synced 2026-10-24 02:28:55 +03:00
Bug 1834: FTP file uploads are interrupting with TLS 1.3
https://winscp.net/tracker/1834 Source commit: ed1a795deeb85606fa2ebb3cb265a407b5abfbef
This commit is contained in:
@@ -983,12 +983,12 @@ BOOL CAsyncSslSocketLayer::ShutDown(int nHow /*=sends*/)
|
||||
}
|
||||
|
||||
int res = SSL_shutdown(m_ssl);
|
||||
if (res != -1)
|
||||
if (res == 0)
|
||||
{
|
||||
res = SSL_shutdown(m_ssl);
|
||||
}
|
||||
if (res >= 0)
|
||||
{
|
||||
if (!res)
|
||||
{
|
||||
SSL_shutdown(m_ssl);
|
||||
}
|
||||
if (ShutDownComplete())
|
||||
return ShutDownNext();
|
||||
else
|
||||
|
||||
@@ -785,8 +785,12 @@ void CTransferSocket::OnSend(int nErrorCode)
|
||||
CloseOnShutDownOrError(CSMODE_TRANSFERERROR);
|
||||
return;
|
||||
}
|
||||
else if (!pos && numread < (currentBufferSize-m_bufferpos) && m_bufferpos != currentBufferSize)
|
||||
else if (!pos && // all data in buffer were sent
|
||||
numread < (currentBufferSize-m_bufferpos) && // was read less then wanted (eof reached?)
|
||||
m_bufferpos != currentBufferSize) // and it's not because the buffer is full?
|
||||
{
|
||||
// With TLS 1.3 we can get back
|
||||
m_bufferpos = 0;
|
||||
CloseOnShutDownOrError(0);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user