public static void CheckSession() { try { if ((DateTime.Now - LastSessionUsage).TotalSeconds >= 120) { MarkSessionUsage(); MySql.Data.MySqlClient.MySqlConnection c = Session.Connection as MySql.Data.MySqlClient.MySqlConnection; if (c != null) { c.ClearAllPoolsAsync(); } Session.SqlActions.ExecuteNonQuery("select 1"); } } catch { } finally { MarkSessionUsage(); } }