OpenELEC/OpenELEC.tv — pull request #2555 by verybadsoldier (2013-08-31 12:41:39+00:00)
Title: XBMC patch to deinitialize MySQL connections of some windows before suspend

XBMC sometimes freezes when resuming from standby when using a MySQL server. It locks up on the database update that happens on wake up.

It happens when XBMC goes to sleep for example while a certain window is open. Some windows have their own database connections that are kept open when XBMC goes to standby. For example all windows that inherited from CGUIWindowVideoBase. When resuming later the server has closed the connection but XBMC still tries to access it which makes XBMC lock up.

---------
I did not get a reply to this on the XBMC forum (http://forum.xbmc.org/showthread.php?tid=171349) but I am testing this for some time and the problem is completely solved. Also I didnt encounter any side effects.
This is the OE forum thread:
http://openelec.tv/forum/112-mysql-setup/66482-xbmc-freezes-after-suspend-when-using-mysql