From: des Date: Fri, 19 Oct 2007 13:58:12 +0000 (+0000) Subject: Don't assert that close() returns 0, it won't when the remote end closes X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a7034966c941c4fb4077c32a6ac966fafe25be4;p=varnish Don't assert that close() returns 0, it won't when the remote end closes the connection first. This fixes #168. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2153 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/mgt_cli.c b/varnish-cache/bin/varnishd/mgt_cli.c index e80dbc5b..c4df7628 100644 --- a/varnish-cache/bin/varnishd/mgt_cli.c +++ b/varnish-cache/bin/varnishd/mgt_cli.c @@ -346,10 +346,10 @@ mgt_cli_callback(const struct ev *e, int what) cli_close: vsb_delete(cp->cli->sb); free(cp->buf); - AZ(close(cp->fdi)); + (void)close(cp->fdi); if (cp->fdi == 0) assert(open("/dev/null", O_RDONLY) == 0); - AZ(close(cp->fdo)); + (void)close(cp->fdo); if (cp->fdo == 1) { assert(open("/dev/null", O_WRONLY) == 1); close(2);