From 4f765de3341f6b24a728264864828f3fd8f98cad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20B=C3=BChler?= Date: Sat, 12 Jul 2008 03:58:39 +0200 Subject: [PATCH] Fix connection close --- src/control.c | 3 +++ 1 file changed, 3 insertions(+) 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);