- if (exit_code && exit_code != RERR_STREAMIO && exit_code != RERR_SIGNAL1
- && (protocol_version >= 31 || am_server || (!am_sender && !am_generator))) {
- if (line > 0)
+ if (exit_code && exit_code != RERR_SOCKETIO && exit_code != RERR_STREAMIO && exit_code != RERR_SIGNAL1
+ && exit_code != RERR_TIMEOUT && !shutting_down && (protocol_version >= 31 || am_receiver)) {
+ if (line > 0) {
+ if (DEBUG_GTE(EXIT, 3)) {
+ rprintf(FINFO, "[%s] sending MSG_ERROR_EXIT with exit_code %d\n",
+ who_am_i(), exit_code);
+ }