mirror of https://github.com/yandex/odyssey.git
Do not use abort() in frontend code (#131)
* Do not use abort() in frontend code * Do not abort() on known but erroneous statuses
This commit is contained in:
parent
b7bcb86956
commit
1b6f168c3d
|
@ -879,10 +879,18 @@ od_frontend_cleanup(od_client_t *client, char *context,
|
|||
/* close backend connection */
|
||||
od_router_close(router, client);
|
||||
break;
|
||||
|
||||
default:
|
||||
abort();
|
||||
break;
|
||||
case OD_UNDEF:
|
||||
case OD_SKIP:
|
||||
case OD_ATTACH:
|
||||
case OD_DETACH:
|
||||
od_error(&instance->logger, context, client, server,
|
||||
"%s", "unexpected error status %s (%d)", od_status_to_str(status), (uint32)status);
|
||||
od_router_close(router, client);
|
||||
break;
|
||||
default:
|
||||
od_error(&instance->logger, context, client, server,
|
||||
"%s", "unexpected error status %s (%d), possible corruption, abort()", od_status_to_str(status), (uint32)status);
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue