mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +02:00
address code-review comments
This commit is contained in:
parent
c80995170a
commit
b8322556a6
3 changed files with 4 additions and 10 deletions
|
@ -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();
|
||||
|
|
|
@ -43,8 +43,7 @@ AssignmentClientMonitor::AssignmentClientMonitor(const unsigned int numAssignmen
|
|||
// create a NodeList so we can receive stats from children
|
||||
DependencyManager::registerInheritance<LimitedNodeList, NodeList>();
|
||||
auto addressManager = DependencyManager::set<AddressManager>();
|
||||
auto nodeList = DependencyManager::set<LimitedNodeList>(DEFAULT_ASSIGNMENT_CLIENT_MONITOR_PORT,
|
||||
DEFAULT_ASSIGNMENT_CLIENT_MONITOR_DTLS_PORT);
|
||||
auto nodeList = DependencyManager::set<LimitedNodeList>(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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue