Connection.HeartBeat with Xamarin on Android
Open
Info
- Dominant language
- C#
- Stars
- 419
- Forks
- 155
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.