Simplify ping/pong based heartbeat implementation

This commit is contained in:
Benjamin Sergeant
2020-03-18 01:13:29 -07:00
parent d6f534de06
commit b287730c19
5 changed files with 42 additions and 144 deletions

View File

@ -270,10 +270,6 @@ namespace ix
// This should keep the connection open and prevent some load balancers such as
// the Amazon one from shutting it down
_webSocket->setPingInterval(kPingIntervalSecs);
// If we don't receive a pong back, declare loss after 3 * N seconds
// (will be 90s now), and close and restart the connection
_webSocket->setPingTimeout(3 * kPingIntervalSecs);
}
void CobraConnection::configure(const ix::CobraConfig& config)