Skip to content

Commit

Permalink
Skip error message only for tcp
Browse files Browse the repository at this point in the history
  • Loading branch information
ktf authored and rbx committed Feb 28, 2022
1 parent 29827f0 commit fa0bf96
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion fairmq/zeromq/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ inline bool Bind(void* socket, const std::string& address, const std::string& id
if (errno == EADDRINUSE) {
// do not print error in this case, this is handled upstream in case no
// connection could be established after trying a number of random ports from a range.
return false;
size_t protocolPos = address.find(':');
std::string protocol = address.substr(0, protocolPos);
if (protocol == "tcp") {
return false;
}
} else if (errno == EACCES) {
// check if TCP port 1 was given, if yes then it will be handeled upstream, print debug only
size_t protocolPos = address.find(':');
Expand Down

0 comments on commit fa0bf96

Please sign in to comment.