[Vortex] Auto-discard notification

Benoit Amiaux b.amiaux at ateme.com
Tue Dec 4 10:26:27 CET 2007


Hello,

Francis Brosnan Blazquez wrote:
> Hi Amiaux,
> 
> Regarding to the test provided, it is not a bug but missing
> documentation. I've updated the vortex_listener_new/2/_full functions
> documentation to include some information about the reference returned
> and how to close a listener. Here is the information:
> 
> --
> NOTE: the reference returned is only owned by the vortex engine. This is
> not the case of vortex_connection_new where the caller acquires
> automatically a reference to the connection (as well as the vortex
> engine).
> 
> In this case, if your intention is to keep a reference for later
> operations, you must call to vortex_connection_ref to avoid losing the
> reference if the system drops the connection. In the same direction, you
> can't call to vortex_connection_close if you don't own the reference
> returned by this function.
> 
> To close immediately a listener you can use vortex_connection_shutdown. 

Just to be sure, the sample application I provided also crash when I use 
vortex_connection_shutdown on the listener and not 
vortex_connection_close. Did you manage to reproduce it ?

What I'm trying to achieve is to inform the vortex engine that it must 
stop accept new connections on the specified listener (because I want to 
actually stop the module)

This raises another issue, how do I actually close connections opened by 
one specified listener ? I assumed they were closed when killing the 
listener. vortex_exit() isn't a proper solution as it's global and I do 
have other parts of my application using vortex for different purposes

Thanks,
AMIAUX Benoît




More information about the Vortex mailing list