Lock started flag when changing it.
This commit is contained in:
parent
80dc0b97a9
commit
ba99f037fb
@ -815,7 +815,9 @@ func (g *grpcServer) Stop() error {
|
|||||||
var err error
|
var err error
|
||||||
select {
|
select {
|
||||||
case err = <-ch:
|
case err = <-ch:
|
||||||
|
g.Lock()
|
||||||
g.started = false
|
g.started = false
|
||||||
|
g.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
@ -739,7 +739,9 @@ func (s *rpcServer) Stop() error {
|
|||||||
var err error
|
var err error
|
||||||
select {
|
select {
|
||||||
case err = <-ch:
|
case err = <-ch:
|
||||||
|
s.Lock()
|
||||||
s.started = false
|
s.started = false
|
||||||
|
s.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user