This commit is contained in:
sleshep 2026-05-26 16:09:32 +03:00 committed by GitHub
commit 4caaf751bb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3370,9 +3370,8 @@ void handleLinkIOError(clusterLink *link) {
void clusterWriteHandler(connection *conn) {
clusterLink *link = connGetPrivateData(conn);
ssize_t nwritten;
size_t totwritten = 0;
while (totwritten < NET_MAX_WRITES_PER_EVENT && listLength(link->send_msg_queue) > 0) {
while (listLength(link->send_msg_queue) > 0) {
listNode *head = listFirst(link->send_msg_queue);
clusterMsgSendBlock *msgblock = (clusterMsgSendBlock*)head->value;
clusterMsg *msg = getMessageFromSendBlock(msgblock);
@ -3400,8 +3399,6 @@ void clusterWriteHandler(connection *conn) {
listDelNode(link->send_msg_queue, head);
server.stat_cluster_links_memory -= sizeof(listNode);
link->send_msg_queue_mem -= sizeof(listNode) + blocklen;
totwritten += nwritten;
}
if (listLength(link->send_msg_queue) == 0)