misc.
This commit is contained in:
@@ -54,7 +54,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
try {
|
||||
log("ColumnLynx Client, Version " + getVersion());
|
||||
log("This software is licensed under the GPLv2 only OR the GPLv3. See LICENSE for details.");
|
||||
log("This software is licensed under the GPLv2 only OR the GPLv3. See LICENSES/ for details.");
|
||||
|
||||
LibSodiumWrapper sodiumWrapper = LibSodiumWrapper();
|
||||
|
||||
@@ -78,7 +78,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
// Client is running
|
||||
// TODO: SIGINT or SIGTERM seems to not kill this instantly!
|
||||
while (client->isConnected() || !client->isHandshakeComplete() || !done) {
|
||||
while ((client->isConnected() || !client->isHandshakeComplete()) && !done) {
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100)); // Temp wait
|
||||
|
||||
if (client->isHandshakeComplete()) {
|
||||
|
||||
@@ -18,26 +18,27 @@ using namespace ColumnLynx::Net::UDP;
|
||||
|
||||
volatile sig_atomic_t done = 0;
|
||||
|
||||
/*void signalHandler(int signum) {
|
||||
void signalHandler(int signum) {
|
||||
if (signum == SIGINT || signum == SIGTERM) {
|
||||
log("Received termination signal. Shutting down server gracefully.");
|
||||
done = 1;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
PanicHandler::init();
|
||||
|
||||
try {
|
||||
// Catch SIGINT and SIGTERM for graceful shutdown
|
||||
/*struct sigaction action;
|
||||
// Capture SIGINT and SIGTERM for graceful shutdown
|
||||
struct sigaction action;
|
||||
memset(&action, 0, sizeof(struct sigaction));
|
||||
action.sa_handler = signalHandler;
|
||||
sigaction(SIGINT, &action, nullptr);
|
||||
sigaction(SIGTERM, &action, nullptr);*/
|
||||
sigaction(SIGTERM, &action, nullptr);
|
||||
|
||||
PanicHandler::init();
|
||||
|
||||
try {
|
||||
|
||||
log("ColumnLynx Server, Version " + getVersion());
|
||||
log("This software is licensed under the GPLv2 only OR the GPLv3. See LICENSE for details.");
|
||||
log("This software is licensed under the GPLv2 only OR the GPLv3. See LICENSES/ for details.");
|
||||
|
||||
// Generate a temporary keypair, replace with actual CA signed keys later (Note, these are stored in memory)
|
||||
LibSodiumWrapper sodiumWrapper = LibSodiumWrapper();
|
||||
|
||||
Reference in New Issue
Block a user