double check enableWhiteList

This commit is contained in:
Yihao Deng 2024-06-13 07:03:15 +00:00
parent 8bbdfacca0
commit f59b88ea93
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ static bool uvHandleReq(SSvrConn* pConn) {
memcpy(pConn->user, pHead->user, strlen(pHead->user));
int8_t forbiddenIp = 0;
if (pThrd->enableIpWhiteList) {
if (pThrd->enableIpWhiteList && tsEnableWhiteList) {
forbiddenIp = !uvWhiteListCheckConn(pThrd->pWhiteList, pConn) ? 1 : 0;
if (forbiddenIp == 0) {
uvWhiteListSetConnVer(pThrd->pWhiteList, pConn);