Skip to content

Commit fea3b29

Browse files
committed
net: Trigger resends from server in deadlock scenario.
The previous commit fixed the deadlock problem but if playing with older clients it can still occur. Add a fix for it on the server side too so the problem is guarded against on both ends.
1 parent b8656b5 commit fea3b29

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/net_server.c

+12
Original file line numberDiff line numberDiff line change
@@ -1681,6 +1681,18 @@ void NET_SV_CheckDeadlock(net_client_t *client)
16811681
break;
16821682
}
16831683
}
1684+
1685+
// If we sent a resend request to break the deadlock, also trigger a
1686+
// resend of any tics we have sitting in the send queue, in case the
1687+
// client is blocked waiting on tics from us that have been lost.
1688+
// This fixes deadlock with some older clients which do not send
1689+
// resends to break deadlock.
1690+
if (i < BACKUPTICS && client->sendseq > client->acknowledged)
1691+
{
1692+
NET_Log("server: also resending tics %d-%d to break deadlock",
1693+
client->acknowledged, client->sendseq - 1);
1694+
NET_SV_SendTics(client, client->acknowledged, client->sendseq - 1);
1695+
}
16841696
}
16851697
}
16861698

0 commit comments

Comments
 (0)