Fix incorrect counting of client connections
This affects later distribution of clients among threads if there had been many connection attempts during loading phase. Former-commit-id: 889bcd1bf1adeb246af04bbeb7f9e51c0c4eff1b
This commit is contained in:
parent
69259d7ee7
commit
5d4fd2ef31
@ -1307,7 +1307,6 @@ void acceptOnThread(connection *conn, int flags, char *cip)
|
|||||||
int res = aePostFunction(g_pserver->rgthreadvar[ielTarget].el, [conn, flags, ielTarget, szT, fBootLoad] {
|
int res = aePostFunction(g_pserver->rgthreadvar[ielTarget].el, [conn, flags, ielTarget, szT, fBootLoad] {
|
||||||
connMarshalThread(conn);
|
connMarshalThread(conn);
|
||||||
acceptCommonHandler(conn,flags,szT,ielTarget);
|
acceptCommonHandler(conn,flags,szT,ielTarget);
|
||||||
if (!g_fTestMode && !fBootLoad)
|
|
||||||
rgacceptsInFlight[ielTarget].fetch_sub(1, std::memory_order_relaxed);
|
rgacceptsInFlight[ielTarget].fetch_sub(1, std::memory_order_relaxed);
|
||||||
zfree(szT);
|
zfree(szT);
|
||||||
});
|
});
|
||||||
@ -1316,7 +1315,6 @@ void acceptOnThread(connection *conn, int flags, char *cip)
|
|||||||
return;
|
return;
|
||||||
// If res != AE_OK we can still try to accept on the local thread
|
// If res != AE_OK we can still try to accept on the local thread
|
||||||
}
|
}
|
||||||
if (!g_fTestMode && !fBootLoad)
|
|
||||||
rgacceptsInFlight[ielTarget].fetch_sub(1, std::memory_order_relaxed);
|
rgacceptsInFlight[ielTarget].fetch_sub(1, std::memory_order_relaxed);
|
||||||
|
|
||||||
aeAcquireLock();
|
aeAcquireLock();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user