service: plumb contexts to all (most) threads (#7363)

This continues the push of plumbing contexts through tendermint. I
attempted to find all goroutines in the production code (non-test) and
made sure that these threads would exit when their contexts were
canceled, and I believe this PR does that.
This commit is contained in:
Sam Kleinman
2021-12-02 21:38:38 +00:00
committed by GitHub
parent b3be1d7d7a
commit 8a991e288c
64 changed files with 964 additions and 727 deletions
+4
View File
@@ -246,6 +246,10 @@ func startSigner(ctx context.Context, cfg *Config) error {
if err := s.Serve(lis); err != nil {
panic(err)
}
go func() {
<-ctx.Done()
s.GracefulStop()
}()
}()
return nil