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

feat(shell): autotab reset shellMain.c

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