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

Connection.HeartBeat with Xamarin on Android #366

Open
motmot80 opened this issue Jul 18, 2019 · 0 comments
Open

Connection.HeartBeat with Xamarin on Android #366

motmot80 opened this issue Jul 18, 2019 · 0 comments
Labels
Info Useful information

Comments

@motmot80
Copy link

motmot80 commented Jul 18, 2019

The implementation of Connection.HeartBeat uses System.Threading.Timer. Unfortunately Xamarin (Mono) on Android uses a Scheduler to implement the Timer.
When an app gets into suspend state the Timer does not trigger (by design), so the connection is disconnected by the broker (RabbitMQ / Azure Service Bus).

We solved this issue by simply changing the Connection.HeartBeat to use a Thread with AutoResetEvent.WaitOne. So there is no dependency to different Timer implementations.

@xinchen10 xinchen10 added the Info Useful information label Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Info Useful information
Projects
None yet
Development

No branches or pull requests

2 participants