The issue here is that the sql_connect() bind and initialize the internal 
database handle structure. If this is not properly done, the module can't 
operate later on the database. If you want to implement a change like this, I 
would suggest to dig a bit deeper in the code.

One idea would be to periodically trigger (e.g. with a timer) a check if the DB 
got available, and then initialize it properly. Probably also necessary would 
be a protection of every DB access with a lock, to prevent errors during the 
initialization (because of the Kamailio multi-process architecture).
 
If you are interested in digging into that feel free to discuss your approach 
on our sr-dev list. If you managed to get a first working version, then just 
open a pull request for a review.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/1681#issuecomment-434464872
_______________________________________________
Kamailio (SER) - Development Mailing List
[email protected]
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to