Skip to content

Commit f834c75

Browse files
authored
gloo: improve error message on connection closed
Differential Revision: D92570243 Pull Request resolved: #489
1 parent 8789be7 commit f834c75

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

gloo/transport/tcp/pair.cc

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,17 +534,29 @@ bool Pair::read() {
534534
}
535535

536536
// Unexpected error
537-
signalException(
538-
GLOO_ERROR_MSG("Read error ", peer_.str(), ": ", strerror(errno)));
537+
signalException(GLOO_ERROR_MSG(
538+
"Read error ",
539+
peer_.str(),
540+
": ",
541+
strerror(errno),
542+
". ",
543+
"This is typically caused by a remote worker hanging or bugs in the application. ",
544+
"Check the logs of the remote worker before reporting an error. ",
545+
"GLHF! 🏖️"));
539546
return false;
540547
}
541548
break;
542549
}
543550

544551
// Transition to CLOSED on EOF
545552
if (rv == 0) {
546-
signalException(
547-
GLOO_ERROR_MSG("Connection closed by peer ", peer_.str()));
553+
signalException(GLOO_ERROR_MSG(
554+
"Connection closed by peer ",
555+
peer_.str(),
556+
". ",
557+
"This is typically caused by a remote worker crashing. ",
558+
"Check the logs of the remote worker before reporting an error. ",
559+
"GLHF! 🏖️"));
548560
return false;
549561
}
550562

0 commit comments

Comments
 (0)