Skip to content

Commit d695d93

Browse files
committed
Remove useless error messages
1 parent 39cd817 commit d695d93

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

connector.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ namespace Profiling {
199199
for(p = servinfo; p != NULL; p = p->ai_next) {
200200
if ((sockfd = socket(p->ai_family, p->ai_socktype,
201201
p->ai_protocol)) == -1) {
202-
perror("client: socket");
202+
// errno is set here, but we don't examine it.
203203
continue;
204204
}
205205

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

216216
break;
217217
}
218218

219+
// Connection failed; give up.
219220
if (p == NULL) {
220-
fprintf(stderr, "client: failed to connect\n");
221221
goto giveup;
222222
}
223223

@@ -226,7 +226,6 @@ namespace Profiling {
226226
_connected = true;
227227
return;
228228
giveup:
229-
std::cerr << "couldn't connect to profiler; running solo\n";
230229
_connected = false;
231230
return;
232231
}

0 commit comments

Comments
 (0)