зеркало из https://github.com/Azure/DotNetty.git
Fix infinite loop during TLS handshake(Only .NET6) (#583)
Fix infinite loop caused by disconnection during TLS handshake, and the memory exploded instantly.
This commit is contained in:
Родитель
18fbb0839e
Коммит
4a5b846054
|
@ -506,6 +506,13 @@ namespace DotNetty.Handlers.Tls
|
|||
}
|
||||
|
||||
int read = currentReadFuture.Result;
|
||||
|
||||
if (read == 0)
|
||||
{
|
||||
//Stream closed
|
||||
return;
|
||||
}
|
||||
|
||||
AddBufferToOutput(outputBuffer, read, output);
|
||||
}
|
||||
|
||||
|
@ -763,4 +770,4 @@ namespace DotNetty.Handlers.Tls
|
|||
|
||||
public static bool HasAny(this TlsHandlerState value, TlsHandlerState testValue) => (value & testValue) != 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче