Commit a6fc27a6 authored by Volodymyr Yurchenko's avatar Volodymyr Yurchenko
Browse files

Implement timeouts when running a command

parent 1b8156fd
Pipeline #1045272 passed with stage
in 1 minute and 31 seconds
......@@ -180,7 +180,8 @@ TGridResult *TJAlien::Command(const char *command, bool interactive, UInt_t stre
{
if (interactive) Info("Command", "Received only command");
result = (TJAlienResult*) connection.RunJsonCommand(sCmd, 0);
TJAlienResultRewriter().Rewrite((std::string)*sCmd, result);
if (result)
TJAlienResultRewriter().Rewrite((std::string)*sCmd, result);
}
else
{
......@@ -230,7 +231,8 @@ TGridResult *TJAlien::Command(const char *command, bool interactive, UInt_t stre
TString *s = new TString(sCommand->GetString());
result = (TJAlienResult*) connection.RunJsonCommand(s, options);
TJAlienResultRewriter().Rewrite(sCommand->GetString().Data(), result);
if (result)
TJAlienResultRewriter().Rewrite(sCommand->GetString().Data(), result);
if (interactive)
{
......
......@@ -167,6 +167,8 @@ void TJAlienConnectionManager::MakeWebsocketConnection(TJAlienCredentialsObject
creation_info.options = 0;
creation_info.vhost_name = "tjalien-root";
creation_info.options |= LWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT;
creation_info.ws_ping_pong_interval = 10;
creation_info.timeout_secs = 5;
// TODO (nhardi): switch to explicit key/cert contents
// see the context_creation_info
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment