Skip to content
Browse files

fixed: mysql connections were not being released correctly when openi…

…ng resulted in an inactive connection.
  • Loading branch information...
1 parent cf30669 commit 6197d036695a19eac6fe17c940c4e657d31f3b9b @firnsy firnsy committed Nov 19, 2011
Showing with 6 additions and 4 deletions.
  1. +6 −4 xbmc/dbwrappers/mysqldataset.cpp
View
10 xbmc/dbwrappers/mysqldataset.cpp
@@ -182,10 +182,12 @@ int MysqlDatabase::connect(bool create_new) {
}
void MysqlDatabase::disconnect(void) {
- if (!active || conn == NULL)
- return;
- mysql_close(conn);
- conn = NULL;
+ if (conn != NULL)
+ {
+ mysql_close(conn);
+ conn = NULL;
+ }
+
active = false;
}

1 comment on commit 6197d03

@Memphiz
Team Kodi member
Memphiz commented on 6197d03 Dec 1, 2011

Hey firnsy,

was this commit ment to close http://trac.xbmc.org/ticket/12202 ?!?

Please sign in to comment.
Something went wrong with that request. Please try again.