diff --git a/libp2p/muxers/mplex/lpchannel.nim b/libp2p/muxers/mplex/lpchannel.nim index bda141abf..dfd83a614 100644 --- a/libp2p/muxers/mplex/lpchannel.nim +++ b/libp2p/muxers/mplex/lpchannel.nim @@ -62,8 +62,7 @@ proc newChannel*(id: uint, result.initBufferStream(writeHandler, size) proc closeMessage(s: LPChannel) {.async.} = - if not s.closed: - await s.conn.writeMsg(s.id, s.closeCode) # write header + await s.conn.writeMsg(s.id, s.closeCode) # write header proc closedByRemote*(s: LPChannel) {.async.} = s.closedRemote = true diff --git a/tests/pubsub/testfloodsub.nim b/tests/pubsub/testfloodsub.nim index d60b30b29..f8389d7af 100644 --- a/tests/pubsub/testfloodsub.nim +++ b/tests/pubsub/testfloodsub.nim @@ -223,7 +223,7 @@ suite "FloodSub": await node.publish("foobar", cast[seq[byte]]("Hello!")) await sleepAsync(100.millis) - await sleepAsync(1.minutes) + await sleepAsync(5000.millis) await allFutures(nodes.mapIt(it.stop())) await allFutures(awaitters)