diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-06-08 09:51:26 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-06-08 09:51:26 +0300 |
commit | 6f481e3ceb08d496d3a42546a87e4d06b6ea8882 (patch) | |
tree | f9c88f4226930f2c80de89eca124d122ec66abae | |
parent | Increase start-up/stop timeout in systemd unit (diff) |
Avoid lager crash on external authentication failure
Fixes #2463
-rw-r--r-- | src/extauth.erl | 4 | ||||
-rw-r--r-- | src/extauth_sup.erl | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/extauth.erl b/src/extauth.erl index b9d472408..170dc23a0 100644 --- a/src/extauth.erl +++ b/src/extauth.erl @@ -128,7 +128,7 @@ handle_call({cmd, Cmd, EndTime}, _From, State) -> {'EXIT', Port, Reason} -> handle_info({'EXIT', Port, Reason}, State) after Timeout -> - {stop, extauth_program_timeout, State} + {stop, normal, State} end; true -> {noreply, State} @@ -148,7 +148,7 @@ handle_info({'EXIT', Port, _Reason}, #state{port = Port, ?ERROR_MSG("External authentication program '~s' has terminated " "unexpectedly (pid=~w), restarting via supervisor...", [State#state.prog, State#state.os_pid]), - {stop, extauth_program_failure, State} + {stop, normal, State} end; handle_info(Info, State) -> ?WARNING_MSG("Unexpected info: ~p", [Info]), diff --git a/src/extauth_sup.erl b/src/extauth_sup.erl index 882c47df5..c9dc0cdff 100644 --- a/src/extauth_sup.erl +++ b/src/extauth_sup.erl @@ -107,4 +107,4 @@ init([Host, Prog, Pool]) -> worker_spec(Pool, Prog, I) -> Worker = extauth:worker_name(Pool, I), {Worker, {extauth, start_link, [Worker, Prog]}, - transient, 5000, worker, [extauth]}. + permanent, 5000, worker, [extauth]}. |