add muxer nil check
This commit is contained in:
parent
cfcda3c3ef
commit
833a5b8e57
|
@ -220,6 +220,10 @@ proc upgradeOutgoing(s: Switch, conn: Connection): Future[Connection] {.async, g
|
||||||
|
|
||||||
trace "upgrading connection"
|
trace "upgrading connection"
|
||||||
let muxer = await s.mux(sconn) # mux it if possible
|
let muxer = await s.mux(sconn) # mux it if possible
|
||||||
|
if muxer == nil:
|
||||||
|
# TODO this might be relaxed in the future
|
||||||
|
raise newException(CatchableError,
|
||||||
|
"a muxer is required for outgoing connections")
|
||||||
|
|
||||||
await s.identify(muxer)
|
await s.identify(muxer)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue