This commit is contained in:
Ștefan Talpalaru 2019-04-25 00:25:34 +02:00
parent 7ec1433b01
commit d0d09559b8
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
1 changed files with 7 additions and 0 deletions

View File

@ -224,3 +224,10 @@ proc redirectPorts*(tcpPort, udpPort: Port, description: string): Option[(Port,
# atexit() in disguise # atexit() in disguise
addQuitProc(stopNatThread) addQuitProc(stopNatThread)
# workaround for https://github.com/nim-lang/Nim/issues/4057
when defined(windows):
proc handler() {.noconv.} =
setupForeignThreadGc()
quit(1)
setControlCHook(handler)