mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-14 02:10:06 +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
|
// player sockets
|
||||||
if (connections.find(fds[i].fd) == connections.end()) {
|
if (connections.find(fds[i].fd) == connections.end()) {
|
||||||
std::cout << "[WARN] Event on non-existant socket?" << std::endl;
|
std::cout << "[FATAL] Event on non-existent socket: " << fds[i].fd << std::endl;
|
||||||
continue; // just to be safe
|
assert(0);
|
||||||
|
/* not reached */
|
||||||
}
|
}
|
||||||
|
|
||||||
CNSocket* cSock = connections[fds[i].fd];
|
CNSocket* cSock = connections[fds[i].fd];
|
||||||
|
Loading…
Reference in New Issue
Block a user