How to use the libp2p-interfaces/src/transport/errors.AbortError function in libp2p-interfaces

To help you get started, we’ve selected a few libp2p-interfaces examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github libp2p / js-libp2p / test / dialing / dial-request.spec.js View on Github external
const onAbort = () => {
        deferred.reject(new AbortError())
        signal.removeEventListener('abort', onAbort)
      }
      signal.addEventListener('abort', onAbort)
github libp2p / js-libp2p / test / dialing / direct.spec.js View on Github external
const onAbort = () => {
        options.signal.removeEventListener('abort', onAbort)
        deferredDial.reject(new AbortError())
      }
      options.signal.addEventListener('abort', onAbort)