Commit f6d71499 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add an assert so I don't again botch the SessClose duration field.

parent bb997101
......@@ -560,6 +560,7 @@ SES_Delete(struct sess *sp, enum sess_close reason, double now)
if (reason == SC_NULL)
reason = (enum sess_close)-sp->fd;
assert(now > sp->t_open);
assert(VTAILQ_EMPTY(&sp->privs->privs));
VSL(SLT_SessClose, sp->vxid, "%s %.3f",
sess_close_2str(reason, 0), now - sp->t_open);
......
......@@ -201,16 +201,16 @@ HTTP1_Session(struct worker *wrk, struct req *req)
Req_Release(req);
switch(hs) {
case HTC_S_CLOSE:
SES_Delete(sp, SC_REM_CLOSE, 0.0);
SES_Delete(sp, SC_REM_CLOSE, NAN);
return;
case HTC_S_TIMEOUT:
SES_Delete(sp, SC_RX_TIMEOUT, 0.0);
SES_Delete(sp, SC_RX_TIMEOUT, NAN);
return;
case HTC_S_OVERFLOW:
SES_Delete(sp, SC_RX_OVERFLOW, 0.0);
SES_Delete(sp, SC_RX_OVERFLOW, NAN);
return;
case HTC_S_EOF:
SES_Delete(sp, SC_REM_CLOSE, 0.0);
SES_Delete(sp, SC_REM_CLOSE, NAN);
return;
default:
WRONG("htc_status (bad)");
......
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