Skip to content

Commit

Permalink
Remove useless error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
cmears committed Sep 16, 2016
1 parent 39cd817 commit d695d93
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions connector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ namespace Profiling {
for(p = servinfo; p != NULL; p = p->ai_next) {
if ((sockfd = socket(p->ai_family, p->ai_socktype,
p->ai_protocol)) == -1) {
perror("client: socket");
// errno is set here, but we don't examine it.
continue;
}

Expand All @@ -209,15 +209,15 @@ namespace Profiling {
#else
close(sockfd);
#endif
perror("client: connect");
// errno is set here, but we don't examine it.
continue;
}

break;
}

// Connection failed; give up.
if (p == NULL) {
fprintf(stderr, "client: failed to connect\n");
goto giveup;
}

Expand All @@ -226,7 +226,6 @@ namespace Profiling {
_connected = true;
return;
giveup:
std::cerr << "couldn't connect to profiler; running solo\n";
_connected = false;
return;
}
Expand Down

0 comments on commit d695d93

Please sign in to comment.