mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Increase maximum number of zeromq sockets and improve output on errors.
FairMQSampler: Modified: comment out an unused loop. FairMQ: Modified: increase maximum number of ZeroMQ sockets (from default 1024). FairMQ: Modified: reduce amount of output when finding port from a range. FairMQ: Modified: stop the Device when socket creation fails and output an error.
This commit is contained in:
committed by
Florian Uhlig
parent
8a82afe184
commit
61f24eb73a
@@ -42,17 +42,26 @@ FairMQSocketNN::FairMQSocketNN(const string& type, int num, int numIoThreads)
|
||||
// http://250bpm.com/blog:14
|
||||
// http://www.freelists.org/post/nanomsg/a-stupid-load-balancing-question,1
|
||||
fSocket = nn_socket(AF_SP_RAW, GetConstant(type));
|
||||
if (fSocket == -1)
|
||||
{
|
||||
LOG(ERROR) << "failed creating socket #" << fId << ", reason: " << nn_strerror(errno);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
fSocket = nn_socket(AF_SP, GetConstant(type));
|
||||
if (fSocket == -1)
|
||||
{
|
||||
LOG(ERROR) << "failed creating socket #" << fId << ", reason: " << nn_strerror(errno);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (type == "sub")
|
||||
{
|
||||
nn_setsockopt(fSocket, NN_SUB, NN_SUB_SUBSCRIBE, NULL, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
LOG(INFO) << "created socket #" << fId;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user