NAT: move setControlCHook() outside the library

This commit is contained in:
Ștefan Talpalaru 2019-07-11 03:47:44 +02:00 committed by zah
parent 93637fa060
commit a1a285c290
1 changed files with 0 additions and 7 deletions

View File

@ -225,10 +225,3 @@ 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)