diff options
| author | Simon MacMullen <simon@rabbitmq.com> | 2014-01-13 15:32:44 +0000 |
|---|---|---|
| committer | Simon MacMullen <simon@rabbitmq.com> | 2014-01-13 15:32:44 +0000 |
| commit | fc549b40576836a381d738d36e98652d58be893b (patch) | |
| tree | 0058d9a903e770981804acbdfc5bce2a8845501d /src/gm.erl | |
| parent | 90510a5b8fa65650139a75345b55fe86a0259058 (diff) | |
| parent | 24392affff5e048899e712806e7f70e4540e7604 (diff) | |
| download | rabbitmq-server-git-fc549b40576836a381d738d36e98652d58be893b.tar.gz | |
Merge in default.
Diffstat (limited to 'src/gm.erl')
| -rw-r--r-- | src/gm.erl | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gm.erl b/src/gm.erl index 098d84fa30..df1c258d70 100644 --- a/src/gm.erl +++ b/src/gm.erl @@ -542,6 +542,7 @@ forget_group(GroupName) -> ok. init([GroupName, Module, Args, TxnFun]) -> + put(process_name, {?MODULE, GroupName}), {MegaSecs, Secs, MicroSecs} = now(), random:seed(MegaSecs, Secs, MicroSecs), Self = make_member(GroupName), @@ -898,13 +899,10 @@ internal_broadcast(Msg, From, State = #state { self = Self, State1 = State #state { pub_count = PubCount1, confirms = Confirms1, broadcast_buffer = Buffer1 }, - case From =/= none of - true -> - handle_callback_result({Result, flush_broadcast_buffer(State1)}); - false -> - handle_callback_result( - {Result, State1 #state { broadcast_buffer = Buffer1 }}) - end. + handle_callback_result({Result, case From of + none -> State1; + _ -> flush_broadcast_buffer(State1) + end}). flush_broadcast_buffer(State = #state { broadcast_buffer = [] }) -> State; |
