drachtio-server
drachtio-server copied to clipboard
clear client data when client disconnects
particularly in outbound mode, when a client disconnects we need to clear associate app and net transactions. There should never be data in those maps when there are no clients connected as below
2017-09-19 13:17:10.345075 ClientController storage counts
2017-09-19 13:17:10.345082 ----------------------------------
2017-09-19 13:17:10.345089 m_clients size: 0
2017-09-19 13:17:10.345095 m_services size: 0
2017-09-19 13:17:10.345102 m_request_types size: 0
2017-09-19 13:17:10.345109 m_map_of_request_type_offsets size: 0
2017-09-19 13:17:10.345116 m_mapDialogs size: 0
2017-09-19 13:17:10.345123 m_mapNetTransactions size: 20
2017-09-19 13:17:10.345130 m_mapAppTransactions size: 3
I'm encountering a problem because this persists even after restarting drachtio... I'm on the cluster-experimental branch, have restarted both drachtio and redis, and only have 1 node process running that connected to the server once, but it shows up as having 6 clients.
The result is that it sometimes doesn't know where to route invites, since the clients it tries don't exist anymore....
I'm not sure if this is the same error - if not I'll create a new ticket.
2018-01-03 17:05:15.998897 ClientController storage counts 2018-01-03 17:05:15.998904 ---------------------------------- 2018-01-03 17:05:15.998912 m_clients size: 6 2018-01-03 17:05:15.998920 m_services size: 0 2018-01-03 17:05:15.998928 m_request_types size: 30 2018-01-03 17:05:15.998936 m_map_of_request_type_offsets size: 5
the m_clients size: 6
may or may not indicate a problem. Basically, the drachtio server removes clients lazily; ie if a client drops it may not be removed until the server next goes to choose a client.
What would be good would be to see a log snippet where you have a client connected (log shows the client connecting) and then an INVITE comes in and the drachtio server logs about having no connected clients to send it to