25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-28 16:34:13 +01:00

XEP-0198: Remove unused function clause

In the 'wait_for_resume' state, #state.mgmt_pending_since is always
initialized.  fsm_next_state/2 takes care of that.
This commit is contained in:
Holger Weiss 2014-09-06 20:39:38 +02:00
parent 646b445515
commit 2ca563e328

View File

@ -2480,11 +2480,6 @@ fsm_next_state(StateName, StateData) ->
fsm_reply(Reply, session_established, StateData) -> fsm_reply(Reply, session_established, StateData) ->
{reply, Reply, session_established, StateData, {reply, Reply, session_established, StateData,
?C2S_HIBERNATE_TIMEOUT}; ?C2S_HIBERNATE_TIMEOUT};
fsm_reply(Reply, wait_for_resume, #state{mgmt_pending_since = undefined} =
StateData) ->
{reply, Reply, wait_for_resume,
StateData#state{mgmt_pending_since = os:timestamp()},
StateData#state.mgmt_timeout};
fsm_reply(Reply, wait_for_resume, StateData) -> fsm_reply(Reply, wait_for_resume, StateData) ->
Diff = timer:now_diff(os:timestamp(), StateData#state.mgmt_pending_since), Diff = timer:now_diff(os:timestamp(), StateData#state.mgmt_pending_since),
Timeout = max(StateData#state.mgmt_timeout - Diff div 1000, 1), Timeout = max(StateData#state.mgmt_timeout - Diff div 1000, 1),