hyper-systems / ocaml-mqtt

MQTT client for OCaml
https://hyper-systems.github.io/ocaml-mqtt
19 stars 5 forks source link

Clean up source code and simplify pinger #11

Closed rizo closed 2 years ago

rizo commented 2 years ago

Did a quick pass to clean up the existing code, improve logging and error-reporting. We were also experiencing issues in production due to the usage of <&> that silently ignored exceptions in the reader loop (see this).

I also simplified the pinger to periodically publish ping requests (and for now just ignore ping responses).

It's been performing more reliably for us, so I thought I'd make a PR with these changes.

@clecat let me know what you think and apologies for a large diff!

clecat commented 2 years ago

It looks good to me appart from the .ocamlformat file