Commit 4a28167c authored by Tollef Fog Heen's avatar Tollef Fog Heen

Merge r5160: Flush log on backend close

Add explicit log flushing when backend connections close to keep log
chronology. This is to avoid log lines for the same (reused) FD coming
before the closing connection when load is high.

Fixes #739



git-svn-id: http://www.varnish-cache.org/svn/branches/2.1@5341 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 17d2546a
......@@ -345,6 +345,11 @@ vbe_GetVbe(struct sess *sp, struct backend *bp)
}
VSL_stats->backend_toolate++;
WSL(sp->wrk, SLT_BackendClose, vc->fd, "%s", bp->vcl_name);
/* Checkpoint log to flush all info related to this connection
before the OS reuses the FD */
WSL_Flush(sp->wrk, 0);
TCP_close(&vc->fd);
VBE_DropRefConn(bp);
vc->backend = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment