odissey: set proper client transition in transaction pooling

This commit is contained in:
Dmitry Simonenko 2017-02-20 17:49:50 +03:00
parent 88de4ac4e3
commit ed1ddd01de
1 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,7 @@ od_router_transaction(od_client_t *client)
route->scheme->client_max);
return OD_RS_ELIMIT;
}
od_clientpool_set(&route->client_pool, client, OD_CQUEUE);
od_clientpool_set(&route->client_pool, client, OD_CPENDING);
client->route = route;
od_debug(&pooler->od->log, client->io, "C: route to %s server",
@ -134,6 +134,8 @@ od_router_transaction(od_client_t *client)
if (type == 'Z') {
if (! server->is_transaction) {
od_clientpool_set(&route->client_pool, client,
OD_CPENDING);
client->server = NULL;
od_berelease(server);
server = NULL;