Skip to content

Commit

Permalink
fix race condition in shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Amit Dalal committed May 28, 2021
1 parent 5b76c58 commit c715f3b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions runtime/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c715f3b

Please sign in to comment.