diff --git a/src/os/inc/osSocket.h b/src/os/inc/osSocket.h index 7dabd161b4788367c86290c7efbee7aeb3e54e65..63498596113aea603b41cd53fdde03f44d021ce3 100644 --- a/src/os/inc/osSocket.h +++ b/src/os/inc/osSocket.h @@ -39,7 +39,7 @@ static FORCE_INLINE int32_t taosCloseSocket(int x) { x = ((int32_t)-1); } if (ret != 0) { - exit(10); + assert(false); } return ret; } diff --git a/src/sync/src/syncMain.c b/src/sync/src/syncMain.c index 565a84f21c6afbea8c06c41da1e35a2bc7845e2a..10cff04494151eb4106bd48edeec4c5e8147a228 100644 --- a/src/sync/src/syncMain.c +++ b/src/sync/src/syncMain.c @@ -568,7 +568,7 @@ static void syncClosePeerConn(SSyncPeer *pPeer) { taosTmrStopA(&pPeer->timer); if (taosCloseSocket(pPeer->syncFd) != 0) { - exit(4); + exit(false); } if (pPeer->peerFd >= 0) { pPeer->peerFd = -1; @@ -896,7 +896,7 @@ static void syncRestartPeer(SSyncPeer *pPeer) { if (pPeer->nodeId == 0 || ret > 0 || (ret == 0 && pPeer->port > tsSyncPort)) { sDebug("%s, check peer connection in 1000 ms", pPeer->id); if (!taosTmrReset(syncCheckPeerConnection, SYNC_CHECK_INTERVAL, (void *)pPeer->rid, tsSyncTmrCtrl, &pPeer->timer)) { - exit(3); + assert(false); } } } diff --git a/src/sync/src/syncTcp.c b/src/sync/src/syncTcp.c index f69c7e137ac80da5bf5bfaafc180a1927f15737e..8ca5b63ba17ff04cd8c64e0ed1d47b414c83ed5a 100644 --- a/src/sync/src/syncTcp.c +++ b/src/sync/src/syncTcp.c @@ -169,7 +169,7 @@ void syncFreeTcpConn(void *param) { sDebug("%p TCP connection will be closed, fd:%d", pThread, pConn->fd); pConn->closedByApp = 1; if (shutdown(pConn->fd, SHUT_WR) != 0) { - exit(2); + ASSERT(false); } }