diff --git a/transport/transport.go b/transport/transport.go index 99302264..7acb8dd8 100644 --- a/transport/transport.go +++ b/transport/transport.go @@ -81,14 +81,9 @@ type Transport interface { // See the Network interface for an explanation of how this is used. // TODO: Make this a part of the go-multiaddr protocol instead? Proxy() bool -} - -// ClosableTransport is for transport that run a service beyond a listener -// (overlay networks, ...). -type ClosableTransport interface { - Transport - - // Close is called when the libp2p node doesn't need the transport anymore. + + // If your transport implements `io.Closer` Close will be called + // when libp2p doesn't need it anymore. // (libp2p closing, transport unhooked from a node, ...) // // Once a Close is called you can safely assume no more Dial or Listen are @@ -98,7 +93,6 @@ type ClosableTransport interface { // (ex: transport already closed or transport never started). // // No more than one Close will ever be issued on an instance. - Close() error } // Listener is an interface closely resembling the net.Listener interface. The