[ejabberd] The strange useless loop in ejabberd_app.erl

Xi Liu jason.liuxi at gmail.com
Tue Apr 6 11:55:21 MSD 2010

Hi all,
  I find a really strange thing in the code.
  In ejabberd_app.erl there is a loop function doing nothing just loop on
the expat_erl port it opend before,

loop(Port) ->
    _ ->

After I comment the call to the loop function, Clients could no longer
connect to the server. I debuged and found that this due to xml_stream
cannot open a new expat_erl port, and the console says  "expat_erl: not
So in conclusion, the useless loop helps  the successive  expat_erl
open_port function find the expat_erl lib?
And now I think the loop was intended, But why?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20100406/8ed85c11/attachment.html>

More information about the ejabberd mailing list