mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Wait for more data than just <stream:stream> before sending in bosh
This fixes issue #2545
This commit is contained in:
parent
ca022b6d1f
commit
1af2cf37ea
@ -365,6 +365,13 @@ wait_for_session(#body{attrs = Attrs} = Req, From,
|
|||||||
{State3, RespEls} = get_response_els(State2),
|
{State3, RespEls} = get_response_els(State2),
|
||||||
State4 = stop_inactivity_timer(State3),
|
State4 = stop_inactivity_timer(State3),
|
||||||
case RespEls of
|
case RespEls of
|
||||||
|
[{xmlstreamstart, _, _} = El1] ->
|
||||||
|
OutBuf = buf_in([El1], State4#state.el_obuf),
|
||||||
|
State5 = restart_wait_timer(State4),
|
||||||
|
Receivers = gb_trees:insert(RID, {From, Resp},
|
||||||
|
State5#state.receivers),
|
||||||
|
{next_state, active,
|
||||||
|
State5#state{receivers = Receivers, el_obuf = OutBuf}};
|
||||||
[] ->
|
[] ->
|
||||||
State5 = restart_wait_timer(State4),
|
State5 = restart_wait_timer(State4),
|
||||||
Receivers = gb_trees:insert(RID, {From, Resp},
|
Receivers = gb_trees:insert(RID, {From, Resp},
|
||||||
|
Loading…
Reference in New Issue
Block a user