Skip to content
This repository was archived by the owner on Jun 26, 2023. It is now read-only.

Commit b32234f

Browse files
authored
fix: add abort options to open connection (#206)
Allow aborting the opening of a connection.
1 parent ff4d63f commit b32234f

File tree

1 file changed

+2
-2
lines changed
  • packages/libp2p-interfaces/src/connection-manager

1 file changed

+2
-2
lines changed

packages/libp2p-interfaces/src/connection-manager/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { EventEmitter } from '../index.js'
1+
import type { AbortOptions, EventEmitter } from '../index.js'
22
import type { Connection } from '../connection/index.js'
33
import type { PeerId } from '../peer-id/index.js'
44
import type { AddressSorter } from '../peer-store/index.js'
@@ -71,7 +71,7 @@ export interface ConnectionManager extends EventEmitter<ConnectionManagerEvents>
7171
/**
7272
* Open a connection to a remote peer
7373
*/
74-
openConnection: (peer: PeerId) => Promise<Connection>
74+
openConnection: (peer: PeerId, options?: AbortOptions) => Promise<Connection>
7575

7676
/**
7777
* Close our connection to a peer

0 commit comments

Comments
 (0)