Skip to content

Commit b20d7e2

Browse files
authored
fix #13132 tnetdial (#13318)
1 parent 7e5c070 commit b20d7e2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/stdlib/tnetdial.nim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ discard """
22
cmd: "nim c --threads:on $file"
33
exitcode: 0
44
output: "OK"
5-
disabled: "travis"
65
"""
76

87
import os, net, nativesockets, asyncdispatch
@@ -39,10 +38,10 @@ proc testThread() {.thread.} =
3938
fd.close()
4039

4140
proc test() =
41+
let serverFd = initIPv6Server("::1", port)
4242
var t: Thread[void]
4343
createThread(t, testThread)
4444

45-
let serverFd = initIPv6Server("::1", port)
4645
var done = false
4746

4847
serverFd.accept().callback = proc(fut: Future[AsyncFD]) =
@@ -58,4 +57,5 @@ proc test() =
5857

5958
joinThread(t)
6059

60+
# this would cause #13132 `for i in 0..<10000: test()`
6161
test()

0 commit comments

Comments
 (0)