Merge remote-tracking branch 'origin/3.0' into enh/opt-transport
This commit is contained in:
parent
e7510e8cb3
commit
8276cd5cbe
|
@ -3437,7 +3437,10 @@ static int32_t delConnFromHeapCache(SHashObj* pConnHeapCache, SCliConn* pConn) {
|
||||||
int32_t compareHeapNode(const HeapNode* a, const HeapNode* b) {
|
int32_t compareHeapNode(const HeapNode* a, const HeapNode* b) {
|
||||||
SCliConn* args1 = container_of(a, SCliConn, node);
|
SCliConn* args1 = container_of(a, SCliConn, node);
|
||||||
SCliConn* args2 = container_of(b, SCliConn, node);
|
SCliConn* args2 = container_of(b, SCliConn, node);
|
||||||
if (transQueueSize(&args1->reqsToSend) > transQueueSize(&args2->reqsToSend)) {
|
|
||||||
|
int32_t totalReq1 = transQueueSize(&args1->reqsToSend) + transQueueSize(&args1->reqsSentOut);
|
||||||
|
int32_t totalReq2 = transQueueSize(&args2->reqsToSend) + transQueueSize(&args2->reqsSentOut);
|
||||||
|
if ( totalReq1 > totalReq2) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue