-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
about auto-connection issues #48
Comments
I have the same problem, but I find it very hard to reproduce. Sometimes it's OK, but sometimes it just goes into loop of connects and disconnects, then program crashes with NPE or OOM. |
OK, definitely a bug. I've found a way to get a good percent of reproducibility.
sudo iptables -A INPUT -p tcp --dport 1883 -j DROP wait up to 30 seconds... than: sudo iptables -D INPUT -p tcp -m tcp --dport 1883 -j DROP And voila! If using blocking connection (for simplicity I even started sample program on localhost):
If using Callback/Continuation Passing based API, I see this loop of connects and disconnects and they occurs on different hawtdispatch threads. Like this:
@chirino , is there any workaround? |
@looluo you know if they are going to merge this back at fuse-source? |
i use "mqtt.setReconnectAttemptsMax(-1)" to set the program auto connect in disconnection,but when i turn off wifi,maybe have passed 30s ,fusesource mqtt-client callback disconnect notification for。 and then turn on again, maybe few seconds,mqtt-client auto connecting ,but appear twice connect,it is cause a loop that connected and disconnect。could somebody help me? thanks
The text was updated successfully, but these errors were encountered: