diff --git a/runtime/gateway.go b/runtime/gateway.go index d8a93bdda..fc0124007 100644 --- a/runtime/gateway.go +++ b/runtime/gateway.go @@ -434,6 +434,9 @@ func (gateway *Gateway) Shutdown() { } }() + // wait for servers to shutdown before stopping GRPCClientDispatcher + swg.Wait() + // stop all grpc clients if gateway.GRPCClientDispatcher != nil { swg.Add(1)