瀏覽代碼

Fix memory leak when SSL is not working properly.

release/3.x.x
Christian Kratky 5 年之前
父節點
當前提交
975eb60e90
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. +2
    -2
      Source/MQTTnet/Implementations/MqttTcpChannel.cs

+ 2
- 2
Source/MQTTnet/Implementations/MqttTcpChannel.cs 查看文件

@@ -84,9 +84,9 @@ namespace MQTTnet.Implementations
if (_options.TlsOptions.UseTls)
{
var sslStream = new SslStream(networkStream, false, InternalUserCertificateValidationCallback);
await sslStream.AuthenticateAsClientAsync(_options.Server, LoadCertificates(), _options.TlsOptions.SslProtocol, _options.TlsOptions.IgnoreCertificateRevocationErrors).ConfigureAwait(false);

_stream = sslStream;

await sslStream.AuthenticateAsClientAsync(_options.Server, LoadCertificates(), _options.TlsOptions.SslProtocol, _options.TlsOptions.IgnoreCertificateRevocationErrors).ConfigureAwait(false);
}
else
{


Loading…
取消
儲存