Skip to content
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

Setter for uncaughtExceptionHandler in ZBeacon Threads #299

Merged
merged 2 commits into from
Nov 2, 2015
Merged

Setter for uncaughtExceptionHandler in ZBeacon Threads #299

merged 2 commits into from
Nov 2, 2015

Conversation

kevinkreiser
Copy link
Contributor

I'm making use of jeromq in a mobile application. The application uses ZBeacon for service discovery but being that its a mobile application a wifi connection cannot be gauranteed. If indeed the wifi connection drops jeromq's beacon threads will have an unhandled exception when they try to send/recv over the udp sockets.

One way I have found to resolve this is to allow the application using the ZBeacon to set the Thread.UncaughtExceptionHandlers on each of the threads. Doing so lets the application catch that state and reset the beacon when wifi comes back.

A working example here:

https://github.com/kevinkreiser/lapse_app/blob/master/app/src/main/java/kevinkreiser/lapse/ServiceNode.java#L150-L157

c-rack added a commit that referenced this pull request Nov 2, 2015
Setter for uncaughtExceptionHandler in ZBeacon Threads
@c-rack c-rack merged commit adc0550 into zeromq:master Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants