Fix connection close

This commit is contained in:
Stefan Bühler 2008-07-12 03:58:39 +02:00
parent 17248320b7
commit 4f765de334

View File

@ -136,6 +136,9 @@ void trial_wait_for_input(trial *t) {
if (len < 0) { if (len < 0) {
fprintf(stderr, "read error: %s\n", strerror(errno)); fprintf(stderr, "read error: %s\n", strerror(errno));
exit(127); exit(127);
} else if (len == 0) {
fprintf(stderr, "connection closed\n");
exit(125);
} }
g_string_append_len(t->parse_ctx->buffer, buffer, len); g_string_append_len(t->parse_ctx->buffer, buffer, len);
control_parse(t); control_parse(t);