add_iq_handler

When adding an iq handler function. First, the ejabberd server receives request and After (handling) retrieving the required data, I have to send it to the source using this function ejabberd_router:route(From, To, XmlBody). It sends the data to the client only one time and prints in the log file this error log

Reason for termination ==
** {function_clause,[{jlib,iq_to_xml,[ok]},
{gen_iq_handler,process_iq,6},
{gen_iq_handler,handle_info,2},
{gen_server,handle_msg,5},
{proc_lib,init_p_do_apply,3}]}

Now the iq handler can not handle any request.

I can not figure out this issue, Could you please help me as I am a beginner to ejabberd development.

Thanks in advance

Syndicate content