Skip to content

Commit

Permalink
WIP: Apparent fix for not leaking signals goroutine
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Reagor committed Oct 19, 2017
1 parent f554335 commit 934ecfe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/signals.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ func (a *App) handleSignals(ctx context.Context, cancel context.CancelFunc) {
switch sig {
case syscall.SIGINT:
a.Terminate()
cancel()
return
case syscall.SIGTERM:
a.Terminate()
cancel()
return
default:
}
case <-ctx.Done():
return
default:
}
}
}()
Expand Down

0 comments on commit 934ecfe

Please sign in to comment.