summaryrefslogtreecommitdiff
path: root/src/gm.erl
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2014-09-17 15:03:24 +0100
committerSimon MacMullen <simon@rabbitmq.com>2014-09-17 15:03:24 +0100
commitd174409fc0946668f4a8edad9ff342cf09b6df21 (patch)
treee77ae182a3f4ad4b0abeb291b6a00efc4eb07167 /src/gm.erl
parente6153d9b5763828d15525f1813a646a0c84c7d3d (diff)
downloadrabbitmq-server-git-d174409fc0946668f4a8edad9ff342cf09b6df21.tar.gz
Rename GM:terminate/2 to GM:handle_terminate/2 so that it doesn't conflict with the same callback in gen_server.
Diffstat (limited to 'src/gm.erl')
-rw-r--r--src/gm.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gm.erl b/src/gm.erl
index 3113f44906..6c09e66417 100644
--- a/src/gm.erl
+++ b/src/gm.erl
@@ -62,7 +62,7 @@
%%
%% leave/1
%% Provide the Pid. Removes the Pid from the group. The callback
-%% terminate/2 function will be called.
+%% handle_terminate/2 function will be called.
%%
%% broadcast/2
%% Provide the Pid and a Message. The message will be sent to all
@@ -493,13 +493,13 @@
%% Called on gm member termination as per rules in gen_server, with
%% the Args provided in start_link plus the termination Reason.
--callback terminate(Args :: term(), Reason :: term()) ->
+-callback handle_terminate(Args :: term(), Reason :: term()) ->
ok | term().
-else.
behaviour_info(callbacks) ->
- [{joined, 2}, {members_changed, 3}, {handle_msg, 3}, {terminate, 2}];
+ [{joined, 2}, {members_changed, 3}, {handle_msg, 3}, {handle_terminate, 2}];
behaviour_info(_Other) ->
undefined.
@@ -737,7 +737,7 @@ handle_info({'DOWN', MRef, process, _Pid, Reason},
terminate(Reason, State = #state { module = Module,
callback_args = Args }) ->
flush_broadcast_buffer(State),
- Module:terminate(Args, Reason).
+ Module:handle_terminate(Args, Reason).
code_change(_OldVsn, State, _Extra) ->