Compare commits

..

No commits in common. "876a9c82cd6ed7f0ef926e07eaf25dd1a42f3ccd" and "2914b95cff2036160344073d7fac888ecc69a4ae" have entirely different histories.

2 changed files with 3 additions and 8 deletions

View File

@ -1,6 +1,6 @@
MIT License MIT License
Copyright (c) 2020-2023 OpenFusion Contributors Copyright (c) 2020-2022 OpenFusion Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

View File

@ -473,15 +473,10 @@ void CNServer::start() {
} else { } else {
std::lock_guard<std::mutex> lock(activeCrit); // protect operations on connections std::lock_guard<std::mutex> lock(activeCrit); // protect operations on connections
// halt packet handling if server is shutting down
if (!active)
return;
// player sockets // player sockets
if (connections.find(fds[i].fd) == connections.end()) { if (connections.find(fds[i].fd) == connections.end()) {
std::cout << "[FATAL] Event on non-existent socket: " << fds[i].fd << std::endl; std::cout << "[WARN] Event on non-existant socket?" << std::endl;
assert(0); continue; // just to be safe
/* not reached */
} }
CNSocket* cSock = connections[fds[i].fd]; CNSocket* cSock = connections[fds[i].fd];