Don't crash in bosh when we receive request with RID < prev_rid
This commit is contained in:
parent
4337300fce
commit
548ef7b835
|
@ -452,7 +452,7 @@ active1(#body{attrs = Attrs} = Req, From, State) ->
|
|||
{next_state, active,
|
||||
do_reply(State, From, PrevBody, RID)};
|
||||
none ->
|
||||
State1 = drop_holding_receiver(State),
|
||||
State1 = drop_holding_receiver(State, RID),
|
||||
State2 = stop_inactivity_timer(State1),
|
||||
State3 = restart_wait_timer(State2),
|
||||
Receivers = gb_trees:insert(RID, {From, Req},
|
||||
|
@ -688,7 +688,8 @@ reply_stop(State, Body, From, RID) ->
|
|||
{stop, normal, do_reply(State, From, Body, RID)}.
|
||||
|
||||
drop_holding_receiver(State) ->
|
||||
RID = State#state.prev_rid,
|
||||
drop_holding_receiver(State#state.prev_rid).
|
||||
drop_holding_receiver(State, RID) ->
|
||||
case gb_trees:lookup(RID, State#state.receivers) of
|
||||
{value, {From, Body}} ->
|
||||
State1 = restart_inactivity_timer(State),
|
||||
|
|
Loading…
Reference in New Issue