From 6f8be9f067eb6e90d47225b39f966851cbd293d3 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Tue, 5 Jun 2018 11:31:18 +0300 Subject: [PATCH] Attempt to fix datagram bug. --- tests/testdatagram.nim | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/testdatagram.nim b/tests/testdatagram.nim index dad4d34e..f8f9af4f 100644 --- a/tests/testdatagram.nim +++ b/tests/testdatagram.nim @@ -141,6 +141,7 @@ proc test1(): Future[int] {.async.} = await dgram2.sendTo(addr data[0], len(data), ta) await dgram2.join() dgram1.close() + dgram2.close() result = counter proc test2(): Future[int] {.async.} = @@ -152,6 +153,7 @@ proc test2(): Future[int] {.async.} = await dgram2.send(addr data[0], len(data)) await dgram2.join() dgram1.close() + dgram2.close() result = counter proc waitAll(futs: seq[Future[void]]): Future[void] = @@ -170,18 +172,18 @@ proc test3(bounded: bool): Future[int] {.async.} = var counter = 0 var dgram1 = newDatagramTransport(client1, udata = addr counter, local = ta) var clients = newSeq[Future[void]](ClientsCount) + var grams = newSeq[DatagramTransport](ClientsCount) var counters = newSeq[int](ClientsCount) - var dgram: DatagramTransport for i in 0..