The problem is all of this functions (Dispose, Destructor ...) are called after the new instance of module is created, so on the creation of the new instance because still the old one is listening on for example port 9999 the new one can not bind to the port. I've found switch_loadable_module_function_table_t which seems to be where I should add my shut down routine but I can not find a way to do so<div>
thanx</div>