commit - f54d892e4b41b214bfbc655c9d9b72d8b2bf0f07
commit + b7acbe65b9c3861892ccd85dce82d78aeb285f54
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)