16217: Exit service command if the service handler fails.
[arvados.git] / services / ws / router.go
index b1764c156cad44c5954ca542fc8178b1cc182e1b..b3403dabd00a3740d87f3136a21076ac4640fdc1 100644 (file)
@@ -37,6 +37,7 @@ type router struct {
        handler   *handler
        mux       *http.ServeMux
        setupOnce sync.Once
+       done      chan struct{}
 
        lastReqID  int64
        lastReqMtx sync.Mutex
@@ -165,3 +166,7 @@ func (rtr *router) CheckHealth() error {
        rtr.setupOnce.Do(rtr.setup)
        return rtr.eventSource.DBHealth()
 }
+
+func (rtr *router) Done() <-chan struct{} {
+       return rtr.done
+}