Skip to content
This repository has been archived by the owner on Aug 30, 2019. It is now read-only.

Commit

Permalink
Merge pull request #333 from DataDog/db/windows_svc
Browse files Browse the repository at this point in the history
Add stop-pending notification immediately when stop is received.
  • Loading branch information
derekwbrown authored Oct 31, 2017
2 parents 289a97c + 4efd9a0 commit 9903528
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion agent/main_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ func (m *myservice) Execute(args []string, r <-chan svc.ChangeRequest, changes c
changes <- c.CurrentStatus
case svc.Stop, svc.Shutdown:
elog.Info(0x40000006, ServiceName)
changes <- svc.Status{State: svc.StopPending}
close(exit)
return
default:
Expand All @@ -84,7 +85,7 @@ func (m *myservice) Execute(args []string, r <-chan svc.ChangeRequest, changes c
elog.Info(0x40000003, ServiceName)
runAgent(exit)

changes <- svc.Status{State: svc.StopPending}
changes <- svc.Status{State: svc.Stopped}
return
}

Expand Down

0 comments on commit 9903528

Please sign in to comment.