Open ghost opened 12 years ago
Same issue happeninig here.
I encountered this issue on Android while testing over 3G.
The base reason for this problem is that the host you're trying to connect to can't be found. This doesn't mean that there is anything wrong with your host or host-name. When Android is switching network (different 3G-networks, 3G to WiFi, etc.) it sometimes takes a while before the DNS lookup is working correctly.
That being said, the MeQanTT API should handle this (and other possible problems) better. Wrapping the exception in a well documented exception, for example. Or even adding some retry functionality. As it is right now, you really need to wrap the connect call in a try-catch clause.
If I get a reason to return to this project, I'll add some error handling. Until then, I'm very grateful for anyone wanting to add it and give me a pull request. Hint, hint... :-)
Notice this happening on Android phones and Bug Labs Angstrum linux devices (sporadically), but not on Mac testing using NettyClient.