diff options
author | jmarshallnz <jcmarsha@gmail.com> | 2012-05-26 15:34:47 -0700 |
---|---|---|
committer | jmarshallnz <jcmarsha@gmail.com> | 2012-05-26 15:34:47 -0700 |
commit | 447a7250a2b8935c1cc7783dfce70221840bdd4e (patch) | |
tree | eb8c31bed35035c38eb776e07ad763f8549d692d | |
parent | 269de6704061b9bb17a37b79c399dd891c58ea79 (diff) | |
parent | f1c52c881feacb7b6915fab9d8c64b1e7777e662 (diff) |
Merge pull request #1016 from fetzerch/bugfix-mysql-reconnect2
Reconnect to MySql DB also on CR_SERVER_LOST error.
-rw-r--r-- | xbmc/dbwrappers/mysqldataset.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xbmc/dbwrappers/mysqldataset.cpp b/xbmc/dbwrappers/mysqldataset.cpp index 2d80ef8b83..b3ea5b2f8e 100644 --- a/xbmc/dbwrappers/mysqldataset.cpp +++ b/xbmc/dbwrappers/mysqldataset.cpp @@ -293,7 +293,7 @@ int MysqlDatabase::query_with_reconnect(const char* query) { // try to reconnect if server is gone while ( ((result = mysql_real_query(conn, query, strlen(query))) != MYSQL_OK) && - ((result = mysql_errno(conn)) == CR_SERVER_GONE_ERROR) && + ((result = mysql_errno(conn)) == CR_SERVER_GONE_ERROR || result == CR_SERVER_LOST) && (attempts-- > 0) ) { CLog::Log(LOGINFO,"MYSQL server has gone. Will try %d more attempt(s) to reconnect.", attempts); |