diff --git a/tools/shell/src/shellWebsocket.c b/tools/shell/src/shellWebsocket.c index add3ccc51f730d9398c7f339f8e3a645cc5a0b0e..ebcd6b9002f3eb55a2758fc00e9d10c1340f6e5a 100644 --- a/tools/shell/src/shellWebsocket.c +++ b/tools/shell/src/shellWebsocket.c @@ -223,11 +223,14 @@ void shellRunSingleCommandWebsocketImp(char *command) { if (code == TSDB_CODE_WS_SEND_TIMEOUT || code == TSDB_CODE_WS_RECV_TIMEOUT) { fprintf(stderr, "Hint: use -t to increase the timeout in seconds\n"); } else if (code == TSDB_CODE_WS_INTERNAL_ERRO || code == TSDB_CODE_WS_CLOSED) { - fprintf(stderr, "TDengine server is disconnected, will try to reconnect\n"); shell.ws_conn = NULL; } ws_free_result(res); - if (reconnectNum == 0) continue; + if (reconnectNum == 0) { + continue; + } else { + fprintf(stderr, "TDengine server is disconnected, will try to reconnect\n"); + } return; } break;