Skip to content

Commit

Permalink
Debug log errno on uncommon client write failure
Browse files Browse the repository at this point in the history
Log the reason of a client write failure in an uncommon case.
  • Loading branch information
cgzones committed Apr 18, 2021
1 parent 129acbd commit a554ca6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions endlessh.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,6 +645,8 @@ sendline(struct client *client, int max_line_length, unsigned long *rng)
} else if (errno == EAGAIN || errno == EWOULDBLOCK) {
return client; /* don't care */
} else {
if (errno != EPIPE)
logmsg(log_debug, "errno = %d, %s", errno, strerror(errno));
client_destroy(client);
return 0;
}
Expand Down

0 comments on commit a554ca6

Please sign in to comment.