diff --git a/assignment-client/src/AssignmentClientApp.cpp b/assignment-client/src/AssignmentClientApp.cpp index cea952a806..cfb77c8542 100644 --- a/assignment-client/src/AssignmentClientApp.cpp +++ b/assignment-client/src/AssignmentClientApp.cpp @@ -29,14 +29,13 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : setvbuf(stdout, NULL, _IOLBF, 0); # endif - + // setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us # ifdef _WIN32 installNativeEventFilter(&ShutdownEventListener::getInstance()); # else ShutdownEventListener::getInstance(); # endif - setOrganizationName("High Fidelity"); setOrganizationDomain("highfidelity.io"); setApplicationName("assignment-client"); @@ -141,7 +140,6 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : walletUUID = parser.value(walletDestinationOption); } - QString assignmentServerHostname; if (argumentVariantMap.contains(ASSIGNMENT_WALLET_DESTINATION_ID_OPTION)) { assignmentServerHostname = argumentVariantMap.value(CUSTOM_ASSIGNMENT_SERVER_HOSTNAME_OPTION).toString(); @@ -150,7 +148,6 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : assignmentServerHostname = parser.value(assignmentServerHostnameOption); } - // check for an overriden assignment server port quint16 assignmentServerPort = DEFAULT_DOMAIN_SERVER_PORT; if (argumentVariantMap.contains(ASSIGNMENT_WALLET_DESTINATION_ID_OPTION)) { @@ -177,12 +174,10 @@ AssignmentClientApp::AssignmentClientApp(int argc, char* argv[]) : if (numForks || minForks || maxForks) { - // setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us AssignmentClientMonitor monitor(numForks, minForks, maxForks, assignmentPool, walletUUID, assignmentServerHostname, assignmentServerPort); exec(); } else { - // setup a shutdown event listener to handle SIGTERM or WM_CLOSE for us AssignmentClient client(requestAssignmentType, assignmentPool, walletUUID, assignmentServerHostname, assignmentServerPort); exec(); diff --git a/assignment-client/src/AssignmentClientMonitor.cpp b/assignment-client/src/AssignmentClientMonitor.cpp index ffc402c04d..7517669d0b 100644 --- a/assignment-client/src/AssignmentClientMonitor.cpp +++ b/assignment-client/src/AssignmentClientMonitor.cpp @@ -43,8 +43,7 @@ AssignmentClientMonitor::AssignmentClientMonitor(const unsigned int numAssignmen // create a NodeList so we can receive stats from children DependencyManager::registerInheritance(); auto addressManager = DependencyManager::set(); - auto nodeList = DependencyManager::set(DEFAULT_ASSIGNMENT_CLIENT_MONITOR_PORT, - DEFAULT_ASSIGNMENT_CLIENT_MONITOR_DTLS_PORT); + auto nodeList = DependencyManager::set(DEFAULT_ASSIGNMENT_CLIENT_MONITOR_PORT); connect(&nodeList->getNodeSocket(), &QUdpSocket::readyRead, this, &AssignmentClientMonitor::readPendingDatagrams); @@ -55,7 +54,8 @@ AssignmentClientMonitor::AssignmentClientMonitor(const unsigned int numAssignmen spawnChildClient(); } - connect(&_checkSparesTimer, SIGNAL(timeout()), SLOT(checkSpares())); + connect(&_checkSparesTimer, &QTimer::timeout, this, &AssignmentClientMonitor::checkSpares); + _checkSparesTimer.start(NODE_SILENCE_THRESHOLD_MSECS * 3); } diff --git a/libraries/networking/src/LimitedNodeList.h b/libraries/networking/src/LimitedNodeList.h index 02234ee4f7..afc98de169 100644 --- a/libraries/networking/src/LimitedNodeList.h +++ b/libraries/networking/src/LimitedNodeList.h @@ -54,7 +54,6 @@ const QString ASSIGNMENT_CLIENT_MONITOR_LOCAL_PORT_SMEM_KEY = "assignment-client const char DEFAULT_ASSIGNMENT_CLIENT_MONITOR_HOSTNAME[] = "localhost"; const unsigned short DEFAULT_ASSIGNMENT_CLIENT_MONITOR_PORT = 40104; -const unsigned short DEFAULT_ASSIGNMENT_CLIENT_MONITOR_DTLS_PORT = 40105; class HifiSockAddr;