Skip to content

Commit

Permalink
agent: don't write server metadata in dev mode (#17383)
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Bond <[email protected]>
  • Loading branch information
loshz authored May 16, 2023
1 parent 59db5e1 commit 8dee353
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -636,8 +636,10 @@ func (a *Agent) Start(ctx context.Context) error {
return err
}

// periodically write server metadata to disk.
go a.persistServerMetadata()
// Periodically write server metadata to disk.
if !consulCfg.DevMode {
go a.persistServerMetadata()
}

incomingRPCLimiter := consul.ConfiguredIncomingRPCLimiter(
&lib.StopChannelContext{StopCh: a.shutdownCh},
Expand Down

0 comments on commit 8dee353

Please sign in to comment.