Lock started flag when changing it.

This commit is contained in:
Milos Gajdos
2019-08-23 15:07:08 +01:00
parent 80dc0b97a9
commit ba99f037fb
2 changed files with 4 additions and 0 deletions

View File

@@ -815,7 +815,9 @@ func (g *grpcServer) Stop() error {
var err error
select {
case err = <-ch:
g.Lock()
g.started = false
g.Unlock()
}
return err