mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-27 14:35:52 +00:00
WebSocket ping frequency must be tunable to work around ELB issue.
This commit is contained in:
@@ -20,10 +20,6 @@
|
||||
|
||||
DEFINE_INSTANCE(WebSocketConnection);
|
||||
|
||||
#ifndef WEBSOCKET_PING_FREQUENCY
|
||||
#define WEBSOCKET_PING_FREQUENCY (5*60)
|
||||
#endif
|
||||
|
||||
template <typename endpoint_type>
|
||||
class WSServerHandler;
|
||||
//
|
||||
@@ -210,7 +206,7 @@ public:
|
||||
connection_ptr ptr = mConnection.lock();
|
||||
if (ptr)
|
||||
{
|
||||
mPingTimer.expires_from_now(boost::posix_time::seconds(WEBSOCKET_PING_FREQUENCY));
|
||||
mPingTimer.expires_from_now(boost::posix_time::seconds(theConfig.WEBSOCKET_PING_FREQ));
|
||||
mPingTimer.async_wait(ptr->get_strand().wrap(boost::bind(
|
||||
&WSConnection<endpoint_type>::pingTimer, mConnection, mHandler, boost::asio::placeholders::error)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user