added a call to clear the timeouts whenever a reconnect happens

this prevents the  from completing and closing the connection