Skip to content

Commit

Permalink
try trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
niinivaa committed May 27, 2021
1 parent b2cc219 commit 9c7b92f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/guildenstern/guildenserver.nim
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,10 @@ var shutdownevent = newSelectEvent()

proc shutdown*() =
{.gcsafe.}: shuttingdown = true
trigger(shutdownevent)
try: trigger(shutdownevent)
except:
echo getCurrentExceptionMsg()
quit(-666)

onSignal(SIGTERM): shutdown()
onSignal(SIGINT): shutdown()
Expand Down

0 comments on commit 9c7b92f

Please sign in to comment.