From b8ae45f9b0ff080f63d1cc6432238fac083ae8f9 Mon Sep 17 00:00:00 2001 From: Dmitry Simonenko Date: Fri, 9 Jun 2017 16:21:40 +0300 Subject: [PATCH] odissey: fix error message prefix; put client to pending pool on tmout --- src/od_frontend.c | 2 +- src/od_router.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/od_frontend.c b/src/od_frontend.c index 73283db5..7dac23e1 100644 --- a/src/od_frontend.c +++ b/src/od_frontend.c @@ -66,7 +66,7 @@ int od_frontend_error(od_client_t *client, char *code, char *fmt, ...) char msg[512]; int msg_len; msg_len = snprintf(msg, sizeof(msg), "odissey: "); - msg_len += vsnprintf(msg, sizeof(msg), fmt, args); + msg_len += vsnprintf(msg + msg_len, sizeof(msg) - msg_len, fmt, args); va_end(args); so_stream_t *stream = &client->stream; so_stream_reset(stream); diff --git a/src/od_router.c b/src/od_router.c index 5e06c7ae..f28d6e49 100644 --- a/src/od_router.c +++ b/src/od_router.c @@ -155,6 +155,7 @@ od_router_attacher(void *arg) int rc; rc = machine_condition(route->scheme->pool_timeout); if (rc < 0) { + od_clientpool_set(&route->client_pool, client, OD_CPENDING); od_debug_client(&instance->log, client->id, "router", "server pool wait timedout, closing"); msg_attach->status = OD_RERROR_TIMEDOUT;