Skip to content

Commit

Permalink
Remove duplicate listen on StopSig.
Browse files Browse the repository at this point in the history
Former-commit-id: 3c303db
  • Loading branch information
turnage committed Nov 12, 2016
1 parent cab0fc1 commit b0d50d6
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions internal/engine/engine.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,10 @@ func (e *Engine) Run() error {
}

for !e.stop {
select {
case <-e.stopSig:
e.stop = true
case <-time.After(e.blockTime()):
if err := e.updateMonitors(); err != nil {
if failer, ok := e.bot.(botfaces.Failer); !(ok && !failer.Fail(err)) {
return err
}
<-time.After(e.blockTime())
if err := e.updateMonitors(); err != nil {
if failer, ok := e.bot.(botfaces.Failer); !(ok && !failer.Fail(err)) {
return err
}
}
}
Expand Down

0 comments on commit b0d50d6

Please sign in to comment.