Browse Source

address review comments

pull/3241/head
Frank Schroeder 7 years ago committed by Frank Schröder
parent
commit
1781fd311f
  1. 3
      agent/consul/session_timers.go
  2. 2
      agent/local.go

3
agent/consul/session_timers.go

@ -24,12 +24,11 @@ func (t *SessionTimers) Get(id string) *time.Timer {
}
// Set stores the timer under given id. If tm is nil the timer
// witht the given id is removed.
// with the given id is removed.
func (t *SessionTimers) Set(id string, tm *time.Timer) {
t.Lock()
defer t.Unlock()
if tm == nil {
// todo(fs): shouldn't we call Stop() here?
delete(t.m, id)
} else {
t.m[id] = tm

2
agent/local.go

@ -28,7 +28,7 @@ type syncStatus struct {
}
// localStateConfig is the configuration for the localState. It is
// popuplated during NewLocalAgent from the agent configuration to avoid
// populated during NewLocalAgent from the agent configuration to avoid
// race conditions with the agent configuration.
type localStateConfig struct {
ACLToken string

Loading…
Cancel
Save