(snake) add an option to disable answering pongs as response to pings, to test cobra client behavior with hanged connections
This commit is contained in:
@ -32,6 +32,7 @@ namespace snake
|
||||
|
||||
// Misc
|
||||
bool verbose;
|
||||
bool disablePong;
|
||||
};
|
||||
|
||||
bool isAppKeyValid(const AppConfig& appConfig, std::string appkey);
|
||||
|
@ -21,6 +21,15 @@ namespace snake
|
||||
, _server(appConfig.port, appConfig.hostname)
|
||||
{
|
||||
_server.setTLSOptions(appConfig.socketTLSOptions);
|
||||
|
||||
if (appConfig.disablePong)
|
||||
{
|
||||
_server.disablePong();
|
||||
}
|
||||
|
||||
std::stringstream ss;
|
||||
ss << "Listening on " << appConfig.hostname << ":" << appConfig.port;
|
||||
ix::IXCoreLogger::Log(ss.str().c_str());
|
||||
}
|
||||
|
||||
//
|
||||
|
Reference in New Issue
Block a user