Closed shingohu closed 5 years ago
Not sure what you mean by 'in java...', the client doesn't know anything about 'other accounts', its just an MQTT client, the onDisconnect callback is wired to the onDone socket callback so is triggered when the socket closes(or when the underlying OS decides to tell you this) so it looks as though on IOS onDone is not being called when you expect it to be, this is really a question for the Google flutter devs, in the Drat VM the client works as expected.
I'm sorry, there's something wrong with my description,I've used this client before https://github.com/eclipse/paho.mqtt.java
,when the same account connect,will receive an EOFException
Yes, thsi is a Java exception raised by the Java runtime, there's no equivalent in Dart, you just get onDone.
in java,when the connectLost callback and the exception is EOFException ,we know another account online
another question, the same code the library version is v5.5.0 in android immediately received a onDisconnected callback when I disconnected the network but in ios the onDisconnected callback don't call or after a long time the callback will execute