Disconnect and set agent to None if we're reconnecting. This should fix most reconnection problems.