You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first connection my ManagedClient is starting is always failing. The server does not get any authentication request. The bug is only happening on the client side not on the server side. I've tried debugging it and the only event I'm getting into is the CertificateValidationHandler of the ManagedClient. The code inside CertificateValidationHandler is working fine and returning true at the end. Directly after that I'm already getting in the ConnectingFailedAsync event.
This bug is only happening on the very first connect attempt. After that everything is working fine.
Which component is your bug related to?
ManagedClient
To Reproduce
Steps to reproduce the behavior:
Using this version of MQTTnet '4.3.3.952'.
Run the code below.
See error.
Expected behavior
Should work on the first attempt
Additional context / logging
Error log:
ConnectingFailedAsync: 'MQTTnet.Adapter.MqttConnectingFailedException: Error while authenticating. Connection closed.
---> MQTTnet.Exceptions.MqttCommunicationException: Connection closed.
at MQTTnet.Client.MqttClient.Authenticate(IMqttChannelAdapter channelAdapter, MqttClientOptions options, CancellationToken cancellationToken)
--- End of inner exception stack trace ---
at MQTTnet.Client.MqttClient.Authenticate(IMqttChannelAdapter channelAdapter, MqttClientOptions options, CancellationToken cancellationToken)
at MQTTnet.Client.MqttClient.ConnectInternal(IMqttChannelAdapter channelAdapter, CancellationToken cancellationToken)
at MQTTnet.Client.MqttClient.ConnectAsync(MqttClientOptions options, CancellationToken cancellationToken)
at MQTTnet.Client.MqttClient.ConnectAsync(MqttClientOptions options, CancellationToken cancellationToken)
at MQTTnet.Extensions.ManagedClient.ManagedMqttClient.ReconnectIfRequiredAsync(CancellationToken cancellationToken)'
Code example
Please provide full code examples below where possible to make it easier for the developers to check your issues.
Ideally a Unit Test (which shows the error) is provided so that the behavior can be reproduced easily.
Describe the bug
The first connection my ManagedClient is starting is always failing. The server does not get any authentication request. The bug is only happening on the client side not on the server side. I've tried debugging it and the only event I'm getting into is the CertificateValidationHandler of the ManagedClient. The code inside CertificateValidationHandler is working fine and returning true at the end. Directly after that I'm already getting in the ConnectingFailedAsync event.
This bug is only happening on the very first connect attempt. After that everything is working fine.
Which component is your bug related to?
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should work on the first attempt
Additional context / logging
Error log:
Code example
Please provide full code examples below where possible to make it easier for the developers to check your issues.
Ideally a Unit Test (which shows the error) is provided so that the behavior can be reproduced easily.
The text was updated successfully, but these errors were encountered: