Commit e574df8e authored by Martin Blix Grydeland's avatar Martin Blix Grydeland

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.

Trunk r5160 reworked for 2.1 branch.



git-svn-id: http://www.varnish-cache.org/svn/branches/2.1@5161 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 8db4492b
......@@ -386,6 +386,11 @@ VBE_ClosedFd(struct sess *sp)
bp = sp->vbe->backend;
WSL(sp->wrk, SLT_BackendClose, sp->vbe->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(&sp->vbe->fd);
VBE_DropRefConn(bp);
sp->vbe->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