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

Shift some code to more appropriate location

parent 3d186d94
......@@ -331,28 +331,10 @@ pool_queue(struct pool *pp, struct sess *sp)
int
Pool_Schedule(struct pool *pp, struct sess *sp)
{
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
AZ(sp->wrk);
if (pool_queue(pp, sp) == 0)
return(0);
VSC_C_main->client_drop_late++;
/*
* Couldn't queue it -- kill it.
*
* XXX: a notice might be polite, but would potentially
* XXX: sleep whichever thread got us here
*/
sp->t_end = VTIM_real();
if (sp->vcl != NULL) {
/*
* A session parked on a busy object can come here
* after it wakes up. Loose the VCL reference.
*/
VCL_Rel(&sp->vcl);
}
return (1);
return(pool_queue(pp, sp));
}
/*--------------------------------------------------------------------
......
......@@ -42,6 +42,7 @@
#include "cache.h"
#include "waiter/waiter.h"
#include "vtim.h"
/*--------------------------------------------------------------------*/
......@@ -266,6 +267,15 @@ SES_Schedule(struct sess *sp)
AN(pp->pool);
if (Pool_Schedule(pp->pool, sp)) {
VSC_C_main->client_drop_late++;
sp->t_end = VTIM_real();
if (sp->vcl != NULL) {
/*
* A session parked on a busy object can come here
* after it wakes up. Loose the VCL reference.
*/
VCL_Rel(&sp->vcl);
}
SES_Delete(sp, "dropped");
return (1);
}
......
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