Hi, I need to handle automatic reconnection to a remote server (actually several remote servers). And it's possible that the remote servers addresses change.
So I lookup from the db the current address, create a connector and connect it. In the sessionClosed callback I flag the lost server as disconnected. Then a scheduled task scan the server list, looks for disconnected servers and execute again the previous code: lookup, new connector, connect. It works very well. The only problem is when to call the connector.dispose method. I tryed to call it from the sessionClosed method but the app freeze. I could reuse the same connector but I should change the address and port every time. And I should keep something like a map to find the connector to be overwritten and reused. So it seems a simpler option just to create a new one every time. Do I have to create a queue of connectorsReadyForDisposal and process it from a scheduled task? Thanks in advance Bye Lorenzo -- It has to start somewhere, It has to start sometime. What better place than here, what better time than now?
