bullmq - v5.81.1
    Preparing search index...

    Function forwardConnectionError

    • Forwards 'error' events from a connection to its owning emitter, but only when a consumer is listening. Emitting 'error' on an EventEmitter with no listeners throws, which would turn a transient connection error (e.g. a failed init handshake before the consumer attached its listener) into an unhandled rejection.

      Parameters

      • emitter: EventEmitter

        The owner emitter (Queue, Worker, FlowProducer, ...).

      • connection: EventEmitter

        The connection whose 'error' events should be forwarded.

      Returns void