hery there.
if want to check if i get a connection lost in my mysql connection. What i do:
onload:
_mySqlConnection = _mySql.OpenDb("...", this);
onunload:
_mySql.CloseDb(_mySqlConnection);
so now i want to check in a timer if the connection already etablished. if not i want to do a reconnect
the reconnect is no problem but i cant find a way to check if the connection is lost.Code:void timer_sqlcon() { if (!closing) { timer.Once(1, () => { if(connection == null)... { } timer_sqlcon(); }); } }
Thanks for help
Checking if MySQL connection is lost?
Discussion in 'Rust Development' started by Sir BenSon, Feb 17, 2017.