           console.log "Retries remaining: #{opts.times}".red.bold
           Sync.sleep(opts.wait)
           opts.times -= 1
-          @emit 'retrying', opts
         else
           throw e
 
     # Out of lives, time to give up...
     console.error "Out of lives... I give up.".red.underline
+    @emit 'retryLoopFail', opts, error
     if opts.silent
       @silentErrors = true
       console.error e.message.red.underline


    @registerPlugins()

    @emit "connecting", @client
    @client.connect (err) =>
      if err
        @emit 'connection-error', err
        console.error "Couldn't connect!".red.bold
        console.error err.message.red
      else
        @emit "adventuring"
        Sync (=> @adventure()), (err, result) =>
          @client.end()
          @emit 'adventure-finished', result
          if err or @silentErrors
            @emit 'adventure-error', err
            console.error "Errors occurred!".red.bold
            console.error err.message.red.underline if err
            console.error()

    opts.times ?= 10
    opts.silent ?= false
    error = null
    @emit 'retryLoopStart', opts
    while opts.times > 0
      @emit 'retry', opts
      try
        result = cb()
        @emit 'retryLoopFinish', opts, result
        result
      catch e
        error = e
        console.trace e
