diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2011-11-02 14:27:45 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2011-11-02 14:27:45 +0000 |
commit | abf7e32c55ee13eea283dea77bba6c7d4889504b (patch) | |
tree | 37f7c39e81eb9d2e561e02adc5c3bd7ed3454ed3 | |
parent | 7bf69d0eb735f0c9de465e0e29b685b0663f5e68 (diff) | |
download | rabbitmq-server-abf7e32c55ee13eea283dea77bba6c7d4889504b.tar.gz |
Correct thinko - permanent + normal is an error, duh!
(And some slightly evil formatting, but I really don't want this to wrap.)
-rw-r--r-- | src/supervisor2.erl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/supervisor2.erl b/src/supervisor2.erl index bab47077..8a72caba 100644 --- a/src/supervisor2.erl +++ b/src/supervisor2.erl @@ -697,11 +697,12 @@ child_exit_reason(#child{}) -> shutdown. child_timeout(#child{shutdown = brutal_kill}) -> infinity; child_timeout(#child{shutdown = Time}) -> Time. -child_res(#child{shutdown = brutal_kill}, killed, false) -> ok; -child_res(#child{}, shutdown, false) -> ok; -child_res(#child{restart_type = permanent}, normal, false) -> ok; -child_res(#child{restart_type = {permanent, _}}, normal, false) -> ok; -child_res(#child{}, R, _) -> {error, R}. +child_res(#child{shutdown=brutal_kill}, killed, false) -> ok; +child_res(#child{}, shutdown, false) -> ok; +child_res(#child{restart_type=permanent}, normal, false) -> {error, normal}; +child_res(#child{restart_type={permanent,_}},normal, false) -> {error, normal}; +child_res(#child{}, normal, false) -> ok; +child_res(#child{}, R, _) -> {error, R}. do_terminate(Child, SupName) when Child#child.pid =/= undefined -> ReportError = shutdown_error_reporter(SupName), |