diff --git a/libp2p/transports/tcptransport.nim b/libp2p/transports/tcptransport.nim index f2af4da..cbd2985 100644 --- a/libp2p/transports/tcptransport.nim +++ b/libp2p/transports/tcptransport.nim @@ -57,7 +57,7 @@ method close*(t: TcpTransport): Future[void] {.async, gcsafe.} = await procCall Transport(t).close() # call base # server can be nil - if isNil(t.server): + if not isNil(t.server): t.server.stop() t.server.close() await t.server.join()