我有一个使用M2MqttDotnetCore(1.08)的xamarin表单移动应用程序,我可以很好地连接到AWS IoT,如果断开wifi / LTE的连接,一旦互联网再次可用,重新连接逻辑将成功恢复连接。< / p>
但是,在我将应用程序与wifi连接且连接断开的情况下,重新连接逻辑失败了,我得到了这些异常,并且应用程序冻结了。
不确定发生了什么-有什么想法吗?
uPLibrary.Networking.M2Mqtt.Exceptions.MqttConnectionException: Exception connecting to the broker ---> System.AggregateException: One or more errors occurred. ---> System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> Mono.Btls.MonoBtlsException: ZeroReturn
at Mono.Btls.MonoBtlsContext.ProcessHandshake () [0x00038] in <3e9b3e26c4694baab3f689687ad40612>:0
at Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake (Mono.Net.Security.AsyncOperationStatus status) [0x0003e] in <3e9b3e26c4694baab3f689687ad40612>:0
at (wrapper remoting-invoke-with-check) Mono.Net.Security.MobileAuthenticatedStream.ProcessHandshake(Mono.Net.Security.AsyncOperationStatus)
at Mono.Net.Security.AsyncHandshakeRequest.Run (Mono.Net.Security.AsyncOperationStatus status) [0x00006] in <3e9b3e26c4694baab3f689687ad40612>:0
at Mono.Net.Security.AsyncProtocolRequest+<ProcessOperation>d__24.MoveNext () [0x000ff] in <3e9b3e26c4694baab3f689687ad40612>:0
--- End of stack trace from previous location where exception was thrown ---
at Mono.Net.Security.AsyncProtocolRequest+<StartOperation>d__23.MoveNext () [0x0008b] in <3e9b3e26c4694baab3f689687ad40612>:0
--- End of inner exception stack trace ---
at Mono.Net.Security.MobileAuthenticatedStream+<ProcessAuthentication>d__47.MoveNext () [0x00254] in <3e9b3e26c4694baab3f689687ad40612>:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <fe08c003e91342eb83df1ca48302ddbb>:0
at System.Threading.Tasks.Task.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x00043] in <fe08c003e91342eb83df1ca48302ddbb>:0
at System.Threading.Tasks.Task.Wait () [0x00000] in <fe08c003e91342eb83df1ca48302ddbb>:0
at uPLibrary.Networking.M2Mqtt.MqttNetworkChannel.Connect () [0x000a3] in <e87b8d9e7cd447a9bd7e888c0ab94dbb>:0
at uPLibrary.Networking.M2Mqtt.MqttClient.Connect (System.String clientId, System.String username, System.String password, System.Boolean willRetain, System.Byte willQosLevel, System.Boolean willFlag, System.String willTopic, System.String willMessage, System.Boolean cleanSession, System.UInt16 keepAlivePeriod) [0x0001e] in <e87b8d9e7cd447a9bd7e888c0ab94dbb>:0
--- End of inner exception stack trace ---
at uPLibrary.Networking.M2Mqtt.MqttClient.Connect (System.String clientId, System.String username, System.String password, System.Boolean willRetain, System.Byte willQosLevel, System.Boolean willFlag, System.String willTopic, System.String willMessage, System.Boolean cleanSession, System.UInt16 keepAlivePeriod) [0x00037] in <e87b8d9e7cd447a9bd7e888c0ab94dbb>:0
at uPLibrary.Networking.M2Mqtt.MqttClient.Connect (System.String clientId, System.String username, System.String password, System.Boolean cleanSession, System.UInt16 keepAlivePeriod) [0x00000] in <e87b8d9e7cd447a9bd7e888c0ab94dbb>:0