(IXCobraConnection) set a ping timeout of 90 seconds. If no pong messages are received as responses to ping for a while, give up and close the connection
This commit is contained in:
parent
bbe744a323
commit
86f6fca703
@ -1,6 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
All changes to this project will be documented in this file.
|
All changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
## [8.0.5] - 2020-01-31
|
||||||
|
|
||||||
|
(IXCobraConnection) set a ping timeout of 90 seconds. If no pong messages are received as responses to ping for a while, give up and close the connection
|
||||||
|
|
||||||
## [8.0.4] - 2020-01-31
|
## [8.0.4] - 2020-01-31
|
||||||
|
|
||||||
(cobra to sentry) remove noisy logging
|
(cobra to sentry) remove noisy logging
|
||||||
|
@ -265,7 +265,15 @@ namespace ix
|
|||||||
_webSocket->setUrl(url);
|
_webSocket->setUrl(url);
|
||||||
_webSocket->setPerMessageDeflateOptions(webSocketPerMessageDeflateOptions);
|
_webSocket->setPerMessageDeflateOptions(webSocketPerMessageDeflateOptions);
|
||||||
_webSocket->setTLSOptions(socketTLSOptions);
|
_webSocket->setTLSOptions(socketTLSOptions);
|
||||||
|
|
||||||
|
// Send a websocket ping every N seconds (N = 30) now
|
||||||
|
// This should keep the connection open and prevent some load balancers such as
|
||||||
|
// the Amazon one from shutting it down
|
||||||
_webSocket->setPingInterval(kPingIntervalSecs);
|
_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);
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -6,4 +6,4 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define IX_WEBSOCKET_VERSION "8.0.4"
|
#define IX_WEBSOCKET_VERSION "8.0.5"
|
||||||
|
Loading…
Reference in New Issue
Block a user