From ce9d5e6c7a6a21b42ad091004ad7fb6f0029acb0 Mon Sep 17 00:00:00 2001 From: findcoo Date: Tue, 22 Aug 2017 12:22:43 +0900 Subject: [PATCH] AtCancel at received sigterm --- observer.go | 1 + 1 file changed, 1 insertion(+) diff --git a/observer.go b/observer.go index 2f72297..ea8d281 100644 --- a/observer.go +++ b/observer.go @@ -83,6 +83,7 @@ func (o *Observer) Watch(target func()) { select { case state := <-sig: log.Printf("capture signal: %s: end observ", state) + o.Handler.AtCancel() o.endSubscribe() return case <-o.doneObserv: