fix issue#18

This commit is contained in:
李方朔 2013-11-05 00:21:30 +08:00
parent 1f1099e667
commit 13bf396306
1 changed files with 4 additions and 1 deletions

View File

@ -67,6 +67,10 @@ info(Pid) ->
init([]) -> init([]) ->
{ok, undefined, hibernate, {backoff, 1000, 1000, 10000}}. {ok, undefined, hibernate, {backoff, 1000, 1000, 10000}}.
handle_call(duplicate_id, _From, State=#state{conn_name=ConnName, client_id=ClientId}) ->
?ERROR("Shutdown for duplicate clientid:~s, conn:~s", [ClientId, ConnName]),
stop({shutdown, duplicate_id}, State);
handle_call(info, _From, #state{conn_name=ConnName, handle_call(info, _From, #state{conn_name=ConnName,
message_id=MsgId, client_id=ClientId} = State) -> message_id=MsgId, client_id=ClientId} = State) ->
Info = [{conn_name, ConnName}, Info = [{conn_name, ConnName},
@ -418,7 +422,6 @@ control_throttle(State = #state{ connection_state = Flow,
end. end.
stop(Reason, State ) -> stop(Reason, State ) ->
{stop, Reason, State}. {stop, Reason, State}.
valid_client_id(ClientId) -> valid_client_id(ClientId) ->