diff --git a/src/control.c b/src/control.c index 064e0f3..870c8ca 100644 --- a/src/control.c +++ b/src/control.c @@ -136,6 +136,9 @@ void trial_wait_for_input(trial *t) { if (len < 0) { fprintf(stderr, "read error: %s\n", strerror(errno)); exit(127); + } else if (len == 0) { + fprintf(stderr, "connection closed\n"); + exit(125); } g_string_append_len(t->parse_ctx->buffer, buffer, len); control_parse(t);