mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-13 02:10:03 +00:00
Make socket connection state mismatch into a fatal error
These problems are usually not ephemeral, and cause persistent console spam, so they should immediately crash the server so they can be investigated.
This commit is contained in:
parent
7aabc507e7
commit
fb5b0eeeb9
@ -479,8 +479,9 @@ void CNServer::start() {
|
||||
|
||||
// player sockets
|
||||
if (connections.find(fds[i].fd) == connections.end()) {
|
||||
std::cout << "[WARN] Event on non-existant socket?" << std::endl;
|
||||
continue; // just to be safe
|
||||
std::cout << "[FATAL] Event on non-existent socket: " << fds[i].fd << std::endl;
|
||||
assert(0);
|
||||
/* not reached */
|
||||
}
|
||||
|
||||
CNSocket* cSock = connections[fds[i].fd];
|
||||
|
Loading…
Reference in New Issue
Block a user