diff --git a/libp2p/stream/connection.nim b/libp2p/stream/connection.nim index ba888c9db..005149c72 100644 --- a/libp2p/stream/connection.nim +++ b/libp2p/stream/connection.nim @@ -41,7 +41,7 @@ proc isUpgraded*(s: Connection): bool = if not isNil(s.upgraded): return s.upgraded.finished -proc upgrade*(s: Connection, failed: ref Exception = nil) = +proc upgrade*(s: Connection, failed: ref CatchableError = nil) = if not isNil(s.upgraded): if not isNil(failed): s.upgraded.fail(failed) diff --git a/libp2p/switch.nim b/libp2p/switch.nim index a947e0708..0274b1dd7 100644 --- a/libp2p/switch.nim +++ b/libp2p/switch.nim @@ -85,8 +85,6 @@ proc removePeerEventHandler*(s: Switch, kind: PeerEventKind) = s.connManager.removePeerEventHandler(handler, kind) -proc disconnect*(s: Switch, peerId: PeerID) {.async, gcsafe.} - proc isConnected*(s: Switch, peerId: PeerID): bool = ## returns true if the peer has one or more ## associated connections (sockets) diff --git a/libp2p/transports/tcptransport.nim b/libp2p/transports/tcptransport.nim index 50513b19c..97c977972 100644 --- a/libp2p/transports/tcptransport.nim +++ b/libp2p/transports/tcptransport.nim @@ -35,7 +35,7 @@ type opened*: uint64 closed*: uint64 -proc setupTcpTransportTracker(): TcpTransportTracker {.gcsafe.} +proc setupTcpTransportTracker(): TcpTransportTracker {.gcsafe, raises: [Defect].} proc getTcpTransportTracker(): TcpTransportTracker {.gcsafe.} = result = cast[TcpTransportTracker](getTracker(TcpTransportTrackerName))