Commit 9c918314 authored by Volodymyr Yurchenko's avatar Volodymyr Yurchenko
Browse files

Fix one more place to check connection status

parent 13317868
......@@ -480,8 +480,7 @@ TJAlienResult *TJAlienConnectionManager::RunJsonCommand(TString *command, TList
Info("TJAlienConnectionManager", "JSON command to be done: %s", json_object_to_json_string(jsonCommand) );
this->readBuffer = "";
if (!connection_flag)
if (!IsConnected()) {
Error("TJAlienConnectionManager", "Connection is broken!");
return nullptr;
......@@ -490,7 +489,6 @@ TJAlienResult *TJAlienConnectionManager::RunJsonCommand(TString *command, TList
while (!receive_flag && !destroy_flag)
lws_service(context, 500);
// If connection is broken or closed by server, try to reconnect
// The connection is broken or closed by server, notify TJAlien it has to reconnect
if (destroy_flag) {
Error("TJAlienConnectionManager", "Connection is broken");
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