handle mysql disconnects