Only reconnect if absolutely necessary
SpBills opened this issue · 0 comments
SpBills commented
Right now the heartbeat creates a new connection every single time that it sends.
This is because a REQ socket dies if you try to send another REQ without a REP.
What we would rather do is
- Accept a heartbeat on the server
- Reply to this heartbeat
- On the client side, only reconnect if you don't receive a reply from the server.