]> granicus.if.org Git - ejabberd/commitdiff
* src/mod_muc/mod_muc.erl: Better behaviour under high load
authorAlexey Shchepin <alexey@process-one.net>
Thu, 22 Mar 2007 02:26:35 +0000 (02:26 +0000)
committerAlexey Shchepin <alexey@process-one.net>
Thu, 22 Mar 2007 02:26:35 +0000 (02:26 +0000)
SVN Revision: 748

ChangeLog
src/mod_muc/mod_muc.erl

index d096072fb3afc04af5d4ec2a171b8a5d875ede24..c4860e425391594bccfed1a9f8958461957128bd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-03-22  Alexey Shchepin  <alexey@sevcom.net>
+
+       * src/mod_muc/mod_muc.erl: Better behaviour under high load
+
 2007-03-18  Alexey Shchepin  <alexey@sevcom.net>
 
        * src/ejabberd_s2s.erl: Don't bounce packets with "error" and
index b743f415ce66f7f976af387487ec2f69c9b4ff31..8ed1debdd2b713d24a34a0f2dc6e598ef18bf0d9 100644 (file)
@@ -474,6 +474,7 @@ iq_disco_items(Host, From, Lang) ->
                     case catch gen_fsm:sync_send_all_state_event(
                                  Pid, {get_disco_item, From, Lang}, 100) of
                         {item, Desc} ->
+                            flush(),
                             {true,
                              {xmlelement, "item",
                               [{"jid", jlib:jid_to_string({Name, Host, ""})},
@@ -483,6 +484,13 @@ iq_disco_items(Host, From, Lang) ->
                     end
             end, get_vh_rooms(Host)).
 
+flush() ->
+    receive
+       _ ->
+           flush()
+    after 0 ->
+           ok
+    end.
 
 -define(XFIELD(Type, Label, Var, Val),
        {xmlelement, "field", [{"type", Type},