未验证 提交 085936e6 编写于 作者: sangshuduo's avatar sangshuduo 提交者: GitHub

fix: taos shell prompt if not ws error (#20032)

上级 3bd9af0e
...@@ -218,8 +218,8 @@ void shellRunSingleCommandWebsocketImp(char *command) { ...@@ -218,8 +218,8 @@ void shellRunSingleCommandWebsocketImp(char *command) {
res = ws_query_timeout(shell.ws_conn, command, shell.args.timeout); res = ws_query_timeout(shell.ws_conn, command, shell.args.timeout);
int code = ws_errno(res); int code = ws_errno(res);
if (code != 0 && !shell.stop_query) { if (code != 0 && !shell.stop_query) {
// websocket interface masked off first bit from standard error number. // if it's not a ws connection error
if (TSDB_CODE_PAR_SYNTAX_ERROR == (code|0x80000000)) { if (TSDB_CODE_WS_DSN_ERROR != (code&TSDB_CODE_WS_DSN_ERROR)) {
et = taosGetTimestampUs(); et = taosGetTimestampUs();
fprintf(stderr, "\nDB: error: %s (%.6fs)\n", ws_errstr(res), (et - st)/1E6); fprintf(stderr, "\nDB: error: %s (%.6fs)\n", ws_errstr(res), (et - st)/1E6);
ws_free_result(res); ws_free_result(res);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册