def stop(opts = {})
      mutex.synchronize do
        check_process!

        log(:debug) { "Stop on #{uri}..." }

        connection.release
        connection.delete if opts[:delete]
        connection.close
        dispatcher.shutdown

        reset
      end
    end
def stop(opts = {})
      mutex.synchronize do
        check_process!

        log(:debug) { "Stop on #{uri}..." }

        connection.release
        connection.delete if opts[:delete]
        connection.close
        dispatcher.shutdown

        reset
      end
    end
rubocop:disable AbcSize