cancel alarm timer after connected

pull/623/head
JacobBarthelmeh 2023-11-28 08:01:05 -07:00
parent 0c6d34fc67
commit 82323db6f8
1 changed files with 8 additions and 0 deletions

View File

@ -1509,6 +1509,14 @@ static void* HandleConnection(void* arg)
error = WS_FATAL_ERROR;
}
if (graceTime > 0) {
#ifdef WIN32
/* @TODO SetTimer(NULL, NULL, graceTime, alarmCatch); */
#else
alarm(0); /* cancel any alarm */
#endif
}
if (ret != WS_SUCCESS && ret != WS_SFTP_COMPLETE &&
ret != WS_SCP_INIT) {
wolfSSH_Log(WS_LOG_ERROR,