odissey: set server->route to NULL on backend_new error

This commit is contained in:
Dmitry Simonenko 2017-06-15 16:29:30 +03:00
parent cc4f45b86b
commit 6155681a93
2 changed files with 3 additions and 2 deletions

View File

@ -351,6 +351,7 @@ od_backend_new(od_router_t *router, od_route_t *route)
error:
od_serverpool_set(&route->server_pool, server, OD_SUNDEF);
server->route = NULL;
od_backend_close(server);
return NULL;
}

View File

@ -181,7 +181,6 @@ od_signalizer(void *arg)
od_error(&instance->log, "pooler", "failed to init signal handler");
return;
}
for (;;)
{
rc = machine_signal_wait(UINT32_MAX);
@ -189,7 +188,8 @@ od_signalizer(void *arg)
break;
switch (rc) {
case SIGINT:
od_log(&instance->log, "caught SIGINT, closing");
od_log(&instance->log, "SIGINT received, shutting down");
exit(0);
break;
}