mirror of
https://github.com/dotnet/MQTTnet.git
synced 2026-10-18 02:13:00 +08:00
Fix exception handling when using invalid host names upon connect.
This commit is contained in:
@@ -71,6 +71,8 @@ namespace MQTTnet.Implementations
|
||||
|
||||
await socket.ConnectAsync(_options.Server, _options.GetPort(), cancellationToken).ConfigureAwait(false);
|
||||
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
||||
var networkStream = socket.GetStream();
|
||||
|
||||
if (_options.TlsOptions?.UseTls == true)
|
||||
|
||||
Reference in New Issue
Block a user