提交 5cb0fa77 编写于 作者: A Alex Duan

feat(shell): autotab reset shellMain.c

上级 6fc5933b
...@@ -22,15 +22,11 @@ ...@@ -22,15 +22,11 @@
pthread_t pid; pthread_t pid;
static tsem_t cancelSem; static tsem_t cancelSem;
bool stop_fetch = false;
int64_t ws_id = 0;
void shellQueryInterruptHandler(int32_t signum, void *sigInfo, void *context) { void shellQueryInterruptHandler(int32_t signum, void *sigInfo, void *context) {
tsem_post(&cancelSem); tsem_post(&cancelSem);
} }
void shellRestfulSendInterruptHandler(int32_t signum, void *sigInfo, void *context) {}
void *cancelHandler(void *arg) { void *cancelHandler(void *arg) {
setThreadName("cancelHandler"); setThreadName("cancelHandler");
...@@ -39,12 +35,7 @@ void *cancelHandler(void *arg) { ...@@ -39,12 +35,7 @@ void *cancelHandler(void *arg) {
taosMsleep(10); taosMsleep(10);
continue; continue;
} }
if (args.restful || args.cloud) {
stop_fetch = true;
if (wsclient_send_sql(NULL, WS_CLOSE, ws_id)) {
exit(EXIT_FAILURE);
}
}
#ifdef LINUX #ifdef LINUX
int64_t rid = atomic_val_compare_exchange_64(&result, result, 0); int64_t rid = atomic_val_compare_exchange_64(&result, result, 0);
SSqlObj* pSql = taosAcquireRef(tscObjRef, rid); SSqlObj* pSql = taosAcquireRef(tscObjRef, rid);
...@@ -98,7 +89,6 @@ SShellArguments args = {.host = NULL, ...@@ -98,7 +89,6 @@ SShellArguments args = {.host = NULL,
.pktNum = 100, .pktNum = 100,
.pktType = "TCP", .pktType = "TCP",
.netTestRole = NULL, .netTestRole = NULL,
.cloudDsn = NULL,
.cloud = true, .cloud = true,
.cloudHost = NULL, .cloudHost = NULL,
.cloudPort = NULL, .cloudPort = NULL,
...@@ -171,11 +161,6 @@ int main(int argc, char* argv[]) { ...@@ -171,11 +161,6 @@ int main(int argc, char* argv[]) {
taosSetSignal(SIGINT, shellQueryInterruptHandler); taosSetSignal(SIGINT, shellQueryInterruptHandler);
taosSetSignal(SIGHUP, shellQueryInterruptHandler); taosSetSignal(SIGHUP, shellQueryInterruptHandler);
taosSetSignal(SIGABRT, shellQueryInterruptHandler); taosSetSignal(SIGABRT, shellQueryInterruptHandler);
if (args.restful || args.cloud) {
#ifdef LINUX
taosSetSignal(SIGPIPE, shellRestfulSendInterruptHandler);
#endif
}
/* Get grant information */ /* Get grant information */
shellGetGrantInfo(args.con); shellGetGrantInfo(args.con);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册