mbroadst / qamqp

AMQP 0.9.1 implementation for Qt
Other
151 stars 127 forks source link

Added HeartbeatMissed error and counter of missed heartbeats #53

Open KonstantinZvyagin opened 7 years ago

KonstantinZvyagin commented 7 years ago

Some times it's good to see that heartbeat is lost. That means we got a cable cut or some rare situation.

droidsyer commented 7 years ago

Good idea to notify missing heartbeat! Actually if the ethernet cable is unplugged the socket is not able to detect disconnection.

Why this pull request has not been merged?

droidsyer commented 7 years ago

@mbroadst I have just analized the heartbeat mechanism on RabbitMQ. I propose a simplier solution, but it doesn't work properly: Add a signal when heartbeat from server arrives. Handling heartbeat controlling within application client of qamqp. However I verify that this works only for a single client connected to the server. When I try to connect the second client, the server send heartbeat only at second client. So the first one disconnects because of heartbeat missing.

Perhaps this is the reason why you didn't implement this mechanism.