commit - 602eda794f1d6ffa7bf52408686191499e971da3
commit + ae0cca99d4999f67c98e04bf1f806bd1147d9721
blob - e1f90c1960d3e783711dd5f2f29e41b254d35a57
blob + 51069af23874055261175459d6d4d942db02ac41
--- gotd/gotd.c
+++ gotd/gotd.c
int do_disconnect = 0;
client = find_client_by_proc_fd(fd);
- if (client == NULL)
- fatalx("cannot find client for fd %d", fd);
+ if (client == NULL) {
+ /* Can happen during process teardown. */
+ warnx("cannot find client for fd %d", fd);
+ shut = 1;
+ goto done;
+ }
if (client->auth == NULL)
fatalx("cannot find auth child process for fd %d", fd);
struct imsg imsg;
client = find_client_by_proc_fd(fd);
- if (client == NULL)
- fatalx("cannot find client for fd %d", fd);
+ if (client == NULL) {
+ /* Can happen during process teardown. */
+ warnx("cannot find client for fd %d", fd);
+ shut = 1;
+ goto done;
+ }
if (event & EV_READ) {
if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)
struct imsg imsg;
client = find_client_by_proc_fd(fd);
- if (client == NULL)
- fatalx("cannot find client for fd %d", fd);
+ if (client == NULL) {
+ /* Can happen during process teardown. */
+ warnx("cannot find client for fd %d", fd);
+ shut = 1;
+ goto done;
+ }
if (event & EV_READ) {
if ((n = imsg_read(ibuf)) == -1 && errno != EAGAIN)