Reconnect of select_db fails due to an OperationalError

Bughunter has been getting intermittent OperationalError 2006's since about Django 1.5/1.6 when sending signals from one panel to another. Retrying usually succeeds.  Looking at the network traffic it seems to be isolated to a failure in select_db. I've been testing this patch for the last couple of days and it appears to have resolved the problem.