Skip to content

Commit

Permalink
Merge pull request #764 from amdalal/amdalal/shutdown-race-condition-3
Browse files Browse the repository at this point in the history
fix race condition in shutdown
  • Loading branch information
amdalal authored May 28, 2021
2 parents 5b76c58 + c715f3b commit 7f3ed25
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 7f3ed25

Please sign in to comment.