Skip to content
This repository was archived by the owner on Sep 6, 2022. It is now read-only.

Commit cfab100

Browse files
authored
doc: document Close on Transport (#188)
fixes libp2p/go-libp2p#999
1 parent 11f3c3a commit cfab100

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

transport/transport.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ type CapableConn interface {
5454
// CapableConn, which means that they have been upgraded to support
5555
// stream multiplexing and connection security (encryption and authentication).
5656
//
57+
// If a transport implements `io.Closer` (optional), libp2p will call `Close` on
58+
// shutdown. NOTE: `Dial` and `Listen` may be called after or concurrently with
59+
// `Close`.
60+
//
5761
// For a conceptual overview, see https://docs.libp2p.io/concepts/transport/
5862
type Transport interface {
5963
// Dial dials a remote peer. It should try to reuse local listener

0 commit comments

Comments
 (0)