Applied @tleyden 's suggestions in PR (#363)

- Simply reset retry-counter when state becomes IDLE without error.
  - Note: error is reset at beginning of retry() method.