after log error, reset errno
This commit is contained in:
@@ -84,6 +84,8 @@ void acceptor_kni_v2_event(evutil_socket_t fd, short what, void * user)
|
||||
else if (rd <= 0)
|
||||
{
|
||||
TFE_LOG_ERROR(__ctx->logger, "failed at recvmsg from scm socket: %s. ", strerror(errno));
|
||||
/* after log, reset errno */
|
||||
errno = 0;
|
||||
goto __die;
|
||||
}
|
||||
|
||||
@@ -200,6 +202,8 @@ struct acceptor_kni_v2 * acceptor_kni_v2_create(struct tfe_proxy * proxy, const
|
||||
if (remove(__ctx->str_scm_socket) < 0 && errno != ENOENT)
|
||||
{
|
||||
TFE_LOG_ERROR(__ctx->logger, "Failed at remove(%s) : %s", __ctx->str_scm_socket, strerror(errno));
|
||||
/* after log, reset errno */
|
||||
errno = 0;
|
||||
goto __errout;
|
||||
}
|
||||
|
||||
@@ -215,6 +219,8 @@ struct acceptor_kni_v2 * acceptor_kni_v2_create(struct tfe_proxy * proxy, const
|
||||
if (unlikely(__ctx->fd_scm_socket < 0))
|
||||
{
|
||||
TFE_LOG_ERROR(__ctx->logger, "Failed at create scm socket fd: %s", strerror(errno));
|
||||
/* after log, reset errno */
|
||||
errno = 0;
|
||||
goto __errout;
|
||||
}
|
||||
|
||||
@@ -224,6 +230,8 @@ struct acceptor_kni_v2 * acceptor_kni_v2_create(struct tfe_proxy * proxy, const
|
||||
if (unlikely(ret < 0))
|
||||
{
|
||||
TFE_LOG_ERROR(__ctx->logger, "Failed at binding to %s: %s", __sockaddr_un.sun_path, strerror(errno));
|
||||
/* after log, reset errno */
|
||||
errno = 0;
|
||||
goto __errout;
|
||||
}
|
||||
|
||||
@@ -248,6 +256,8 @@ struct acceptor_kni_v2 * acceptor_kni_v2_create(struct tfe_proxy * proxy, const
|
||||
if (unlikely(ret < 0))
|
||||
{
|
||||
TFE_LOG_ERROR(__ctx->logger, "Failed at creating event thread: %s", strerror(errno));
|
||||
/* after log, reset errno */
|
||||
errno = 0;
|
||||
goto __errout;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user