To answer all your questions at once...put the EventConsumer inside a using() block, so it gets disposed.use a static boolean variable in a while loop to .pop the event consumer with a timeout, if pop returns null "continue" the while loop.Subscribe to shutdown, it sets the loop variable to false.API command "shutdown" in the same module to set the variable to false also, so you can unload your module at will w/o crashingThis whole loop shoud be run on it's own thread started from the Load() method.--Dave
Sent: Fri, 20 Sep 2013 04:08:58 -0700
From: Rafal Gwizdala [mailto:rafal.gwizdala@gmail.com]
To: FreeSWITCH Users Help [mailto:freeswitch-users@lists.freeswitch.org]
Subject: Re: [Freeswitch-users] mod_managed - beginner's question about an event listener module
_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
consulting@freeswitch.org
http://www.freeswitchsolutions.com
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
http://www.cudatel.com
Official FreeSWITCH Sites
http://www.freeswitch.org
http://wiki.freeswitch.org
http://www.cluecon.com
FreeSWITCH-users mailing list
FreeSWITCH-users@lists.freeswitch.org
http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
http://www.freeswitch.org