eclipse/paho.mqtt.m2mqtt

ObjectDisposedException at MobileAuthenticatedStream

bhaskar-infotmt opened this issue · 0 comments

We are getting ObjectDisposedException at MobileAuthenticatedStream on Connect() method on a mobile application running on Nokia 7 plus phone (HMD Global). This does not happen on all phone devices but is repeatedly happening on Nokia 7. Any pointers would be appreciated.

InnerException: uPLibrary.Networking.M2Mqtt.Exceptions.MqttCommunicationException ---> System.AggregateException: One or more errors occurred. ---> System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'MobileAuthenticatedStream'.
at Mono.Net.Security.MobileAuthenticatedStream+d__58.MoveNext () [0x001bf] in <6fb28c247b244399bae1ab274efb33ed>:0
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.ThrowIfExceptional (System.Boolean includeTaskCanceledExceptions) [0x00011] in <6eb4d101e3ff4f6aa2ed4600b42cd999>:0
at System.Threading.Tasks.Task1[TResult].GetResultCore (System.Boolean waitCompletionNotification) [0x0002b] in <6eb4d101e3ff4f6aa2ed4600b42cd999>:0 at System.Threading.Tasks.Task1[TResult].get_Result () [0x0000f] in <6eb4d101e3ff4f6aa2ed4600b42cd999>:0
at Mono.Net.Security.MobileAuthenticatedStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00018] in <6fb28c247b244399bae1ab274efb33ed>:0
at System.Net.Security.SslStream.Read (System.Byte[] buffer, System.Int32 offset, System.Int32 count) [0x00006] in <6fb28c247b244399bae1ab274efb33ed>:0
at uPLibrary.Networking.M2Mqtt.MqttNetworkChannel.Receive (System.Byte[] buffer) [0x0000e] in :0
at uPLibrary.Networking.M2Mqtt.MqttClient.ReceiveThread () [0x0000d] in :0
--- End of inner exception stack trace ---
at uPLibrary.Networking.M2Mqtt.MqttClient.SendReceive (System.Byte[] msgBytes, System.Int32 timeout) [0x0008c] in :0
at uPLibrary.Networking.M2Mqtt.MqttClient.SendReceive (uPLibrary.Networking.M2Mqtt.Messages.MqttMsgBase msg, System.Int32 timeout) [0x0001b] in :0
at uPLibrary.Networking.M2Mqtt.MqttClient.SendReceive (uPLibrary.Networking.M2Mqtt.Messages.MqttMsgBase msg) [0x00000] in :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) [0x0005e] in :0