From ecee62f204a93c7f512dce46657fbd101d155d78 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Fri, 18 Mar 2016 13:40:07 +0300 Subject: make termination caused by SIGTERM soft --- accel-pppd/ctrl/ipoe/ipoe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'accel-pppd/ctrl') diff --git a/accel-pppd/ctrl/ipoe/ipoe.c b/accel-pppd/ctrl/ipoe/ipoe.c index c986c63b..63df0660 100644 --- a/accel-pppd/ctrl/ipoe/ipoe.c +++ b/accel-pppd/ctrl/ipoe/ipoe.c @@ -1097,7 +1097,7 @@ static int ipoe_session_terminate(struct ap_session *s, int hard) { struct ipoe_session *ses = container_of(s, typeof(*ses), ses); - if (hard || !conf_soft_terminate || ses->UP) + if (hard || !conf_soft_terminate || ses->UP || ap_shutdown) ipoe_session_terminated(ses); else ses->terminate = 1; @@ -2068,8 +2068,8 @@ static void ipoe_serv_close(struct triton_context_t *ctx) struct ipoe_serv *serv = container_of(ctx, typeof(*serv), ctx); pthread_mutex_lock(&serv->lock); + serv->need_close = 1; if (!list_empty(&serv->sessions)) { - serv->need_close = 1; pthread_mutex_unlock(&serv->lock); return; } -- cgit v1.2.3