Skip to content

Commit

Permalink
rpc: remove unnecessary member
Browse files Browse the repository at this point in the history
  • Loading branch information
tamird committed Aug 25, 2016
1 parent be284fe commit 805c99f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rpc/context.go
Expand Up @@ -81,7 +81,6 @@ type Context struct {
Stopper *stop.Stopper
RemoteClocks *RemoteClockMonitor
masterCtx context.Context
cancel context.CancelFunc

HeartbeatInterval time.Duration
HeartbeatTimeout time.Duration
Expand Down Expand Up @@ -111,7 +110,8 @@ func NewContext(baseCtx *base.Context, hlcClock *hlc.Clock, stopper *stop.Stoppe
ctx.breakerClock = breakerClock{
clock: ctx.localClock,
}
ctx.masterCtx, ctx.cancel = context.WithCancel(context.Background())
var cancel context.CancelFunc
ctx.masterCtx, cancel = context.WithCancel(context.Background())
ctx.Stopper = stopper
ctx.RemoteClocks = newRemoteClockMonitor(ctx.localClock, 10*defaultHeartbeatInterval)
ctx.HeartbeatInterval = defaultHeartbeatInterval
Expand All @@ -121,7 +121,7 @@ func NewContext(baseCtx *base.Context, hlcClock *hlc.Clock, stopper *stop.Stoppe
stopper.RunWorker(func() {
<-stopper.ShouldQuiesce()

ctx.cancel()
cancel()
ctx.conns.Lock()
for key, meta := range ctx.conns.cache {
meta.Do(func() {
Expand Down

0 comments on commit 805c99f

Please sign in to comment.