Skip to content

Commit 9cb5b5f

Browse files
committed
reservations: remove stored runCtx
1 parent f9ff93b commit 9cb5b5f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

instantout/reservation/manager.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ type Manager struct {
2222
// activeReservations contains all the active reservationsFSMs.
2323
activeReservations map[ID]*FSM
2424

25-
runCtx context.Context
26-
2725
sync.Mutex
2826
}
2927

@@ -44,7 +42,6 @@ func (m *Manager) Run(ctx context.Context, height int32,
4442
runCtx, cancel := context.WithCancel(ctx)
4543
defer cancel()
4644

47-
m.runCtx = runCtx
4845
currentHeight := height
4946

5047
err := m.RecoverReservations(runCtx)
@@ -132,7 +129,7 @@ func (m *Manager) newReservation(ctx context.Context, currentHeight uint32,
132129

133130
// Send the init event to the state machine.
134131
go func() {
135-
err = reservationFSM.SendEvent(m.runCtx, OnServerRequest, initContext)
132+
err = reservationFSM.SendEvent(ctx, OnServerRequest, initContext)
136133
if err != nil {
137134
log.Errorf("Error sending init event: %v", err)
138135
}

0 commit comments

Comments
 (0)