Skip to content

Commit

Permalink
fixed: mysql connections were not being released correctly when openi…
Browse files Browse the repository at this point in the history
…ng resulted in an inactive connection.
  • Loading branch information
firnsy committed Nov 19, 2011
1 parent cf30669 commit 6197d03
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions xbmc/dbwrappers/mysqldataset.cpp
Expand Up @@ -182,10 +182,12 @@ int MysqlDatabase::connect(bool create_new) {
} }


void MysqlDatabase::disconnect(void) { void MysqlDatabase::disconnect(void) {
if (!active || conn == NULL) if (conn != NULL)
return; {
mysql_close(conn); mysql_close(conn);
conn = NULL; conn = NULL;
}

active = false; active = false;
} }


Expand Down

1 comment on commit 6197d03

@Memphiz
Copy link
Member

@Memphiz Memphiz commented on 6197d03 Dec 1, 2011

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey firnsy,

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

Please sign in to comment.