Mic92/python-mpd2 — pull request #12 by supermihi (2012-10-30 21:18:37+00:00)
Title: Disable connection timeout when in idle mode

Even if the timeout parameter is set upon connection, the timeout should be disabled when the client enters idle mode, because in this mode it is normal not to receive any packets from MPD for a longer period. According to the specification, the server also disables timeouts in this mode:

"While a client is waiting for idle results, the server disables timeouts, allowing a client to wait for events as long as mpd runs." (http://www.musicpd.org/doc/protocol/ch03.html)

I suggest this patch to set the timeout to None whenever the idle command is issued.