Skip to content

Commit

Permalink
cli: fix \demo shutdown with --global
Browse files Browse the repository at this point in the history
Previously, it crashed due to not setting up the demo's rpc context to
include the artificial latency map.

Release note: None
  • Loading branch information
jordanlewis committed Mar 28, 2021
1 parent 3cfe2a3 commit 6b1b69a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cli/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,9 @@ func getClientGRPCConn(
Stopper: stopper,
Settings: cfg.Settings,
})
if cfg.TestingKnobs.Server != nil {
rpcContext.Knobs = cfg.TestingKnobs.Server.(*server.TestingKnobs).ContextTestingKnobs
}
addr, err := addrWithDefaultHost(cfg.AdvertiseAddr)
if err != nil {
stopper.Stop(ctx)
Expand Down

0 comments on commit 6b1b69a

Please sign in to comment.