Disable heartbeats for libevent because no timers have been implemented (fixes #533)

This commit is contained in:
Emiel Bruijntjes 2024-07-08 20:15:11 +02:00
parent 32faf9526a
commit ba4b8d3685
1 changed files with 16 additions and 0 deletions

View File

@ -140,6 +140,22 @@ private:
std::map<int,std::unique_ptr<Watcher>> _watchers;
/**
* Method that is called when the heartbeat frequency is negotiated
* @param connection The connection that suggested a heartbeat interval
* @param interval The suggested interval from the server
* @return uint16_t The interval to use
*/
virtual uint16_t onNegotiate(TcpConnection *connection, uint16_t interval) override
{
// call base (in the highly theoretical case that the base class does something meaningful)
auto response = TcpHandler::onNegotiate(connection, interval);
// because the LibEvHandler has not yet implemented timers for ensuring that we send
// some data every couple of seconds, we disabled timeouts
return 0;
}
/**
* Method that is called by AMQP-CPP to register a filedescriptor for readability or writability
* @param connection The TCP connection object that is reporting