Stop timeouts when there's an error

Change-Id: Ibee793fa632e032f0374d6c01879bfe2fd00ede9