diff options
author | Matthew Sackman <matthew@rabbitmq.com> | 2010-09-15 10:46:16 +0100 |
---|---|---|
committer | Matthew Sackman <matthew@rabbitmq.com> | 2010-09-15 10:46:16 +0100 |
commit | 5f1615728eb051b7b13a1824fb824c5d1b2ec3e9 (patch) | |
tree | c9c5c31543acebb2bf96140e73e0bac6850c4cb4 | |
parent | 7b8143ab4e210fc2bbed010c3ab2e98c0e0457cc (diff) | |
download | rabbitmq-server-5f1615728eb051b7b13a1824fb824c5d1b2ec3e9.tar.gz |
It's perfectly legal to convert a process to a gen_server by just calling enter_loop. In such cases, init_it is not called. Thus it must still pick up the prioritisers
-rw-r--r-- | src/gen_server2.erl | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gen_server2.erl b/src/gen_server2.erl index 45e3848c..8e35fd10 100644 --- a/src/gen_server2.erl +++ b/src/gen_server2.erl @@ -360,9 +360,10 @@ enter_loop(Mod, Options, State, ServerName, Timeout, Backoff) -> Debug = debug_options(Name, Options), Queue = priority_queue:new(), Backoff1 = extend_backoff(Backoff), - loop(#gs2_state { parent = Parent, name = Name, state = State, - mod = Mod, time = Timeout, timeout_state = Backoff1, - queue = Queue, debug = Debug }). + loop(find_prioritisers( + #gs2_state { parent = Parent, name = Name, state = State, + mod = Mod, time = Timeout, timeout_state = Backoff1, + queue = Queue, debug = Debug })). %%%======================================================================== %%% Gen-callback functions |