multi: add shutdown logs in subservers

This commit adds a simple shutdown to every subserver to assist
debugging.
This commit is contained in:
yyforyongyu committed 2021-09-15 19:52:03 +08:00
1 parent 03bce2129b
commit 3204e2d74b
15 files changed
+24 -6

No files matched your search

+1
View File
@@ -68,6 +68,7 @@ func (h *HostAnnouncer) Start() error {
// Stop signals the HostAnnouncer for a graceful stop.
func (h *HostAnnouncer) Stop() error {
h.stopOnce.Do(func() {
log.Info("HostAnnouncer shutting down")
close(h.quit)
h.wg.Wait()
})