25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-22 17:28:25 +01:00

* src/ejabberd_receiver.erl: Don't activate a socket untill its

receiver process is controlling it

SVN Revision: 1316
This commit is contained in:
Alexey Shchepin 2008-05-04 07:38:24 +00:00
parent 2304f8cbc8
commit 8267194d5e
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-05-04 Alexey Shchepin <alexey@process-one.net>
* src/ejabberd_receiver.erl: Don't activate a socket untill its
receiver process is controlling it
2008-04-30 Christophe Romain <christophe.romain@process-one.net> 2008-04-30 Christophe Romain <christophe.romain@process-one.net>
* src/mod_caps.erl: XEP-0115 patch (EJAB-618) * src/mod_caps.erl: XEP-0115 patch (EJAB-618)

View File

@ -288,11 +288,14 @@ activate_socket(#state{socket = Socket,
process_data(Data, process_data(Data,
#state{xml_stream_state = XMLStreamState, #state{xml_stream_state = XMLStreamState,
shaper_state = ShaperState} = State) -> shaper_state = ShaperState,
c2s_pid = C2SPid} = State) ->
?DEBUG("Received XML on stream = ~p", [binary_to_list(Data)]), ?DEBUG("Received XML on stream = ~p", [binary_to_list(Data)]),
XMLStreamState1 = xml_stream:parse(XMLStreamState, Data), XMLStreamState1 = xml_stream:parse(XMLStreamState, Data),
{NewShaperState, Pause} = shaper:update(ShaperState, size(Data)), {NewShaperState, Pause} = shaper:update(ShaperState, size(Data)),
if if
C2SPid == undefined ->
ok;
Pause > 0 -> Pause > 0 ->
erlang:start_timer(Pause, self(), activate); erlang:start_timer(Pause, self(), activate);
true -> true ->