macOS fix

This commit is contained in:
Ștefan Talpalaru 2019-07-11 00:15:05 +02:00
parent 06ab21e8c5
commit 50095ae22f
No known key found for this signature in database
GPG Key ID: CBF7934204F1B6F9
1 changed files with 5 additions and 4 deletions

View File

@ -46,11 +46,12 @@ proc start() =
nimbus.state = Starting
## Ctrl+C handling
proc handler() {.noconv.} =
proc controlCHandler() {.noconv.} =
when defined(windows):
# workaround for https://github.com/nim-lang/Nim/issues/4057
setupForeignThreadGc()
nimbus.state = Stopping
setControlCHook(handler)
setControlCHook(controlCHandler)
## logging
setLogLevel(conf.debug.logLevel)