Always inform clients why the server chose to disconnect them, i.e. stop using NDR_UNKNOWN as a disconnect reason when the reason is known and add a LOGWARNING for future authors.

Differential Revision: https://code.wildfiregames.com/D1561
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22996.
This commit is contained in:
elexis
2019-09-26 11:36:03 +00:00
parent 767c7f5856
commit 0817d5d715
6 changed files with 34 additions and 17 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2018 Wildfire Games.
/* Copyright (C) 2019 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -58,7 +58,7 @@ void CNetServerTurnManager::NotifyFinishedClientCommands(CNetServerSession& sess
turn,
m_ClientsReady[client] + 1);
session.Disconnect(NDR_UNKNOWN);
session.Disconnect(NDR_INCORRECT_READY_TURN_COMMANDS);
}
m_ClientsReady[client] = turn;
@@ -106,7 +106,7 @@ void CNetServerTurnManager::NotifyFinishedClientUpdate(CNetServerSession& sessio
turn,
m_ClientsReady[client] + 1);
session.Disconnect(NDR_UNKNOWN);
session.Disconnect(NDR_INCORRECT_READY_TURN_SIMULATED);
}
m_ClientsSimulated[client] = turn;