mirror of
https://github.com/linka-cloud/grpc.git
synced 2024-11-21 18:36:25 +00:00
shutdown: catch Drain() is not implemented
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
This commit is contained in:
parent
e5a45801a1
commit
70913ba556
@ -270,9 +270,14 @@ func (s *service) Stop() error {
|
||||
sigs := s.notify()
|
||||
done := make(chan struct{})
|
||||
go func() {
|
||||
defer close(done)
|
||||
// TODO(adphi): find a better solution
|
||||
defer func() {
|
||||
// catch: Drain() is not implemented
|
||||
recover()
|
||||
}()
|
||||
logrus.Warn("shutting down gracefully")
|
||||
s.server.GracefulStop()
|
||||
close(done)
|
||||
}()
|
||||
select {
|
||||
case sig := <-sigs:
|
||||
|
Loading…
Reference in New Issue
Block a user