From 946b9580c01019e94e101ce02964b840a27534de Mon Sep 17 00:00:00 2001 From: Dmitriy Ryajov Date: Tue, 25 Feb 2020 17:20:57 -0600 Subject: [PATCH] don't use nil result --- libp2p/switch.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/libp2p/switch.nim b/libp2p/switch.nim index 111272ba5..5d266c55d 100644 --- a/libp2p/switch.nim +++ b/libp2p/switch.nim @@ -256,6 +256,7 @@ proc dial*(s: Switch, if conn.closed: raise newException(CatchableError, "Connection dead on arrival") + result = conn let stream = await s.getMuxedStream(peer) if not isNil(stream): trace "Connection is muxed, return muxed stream"