File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -56,15 +56,22 @@ func (m *Manager) Run(ctx context.Context, height int32) error {
56
56
return err
57
57
}
58
58
59
- ntfnChan := m .cfg .NotificationManager .SubscribeReservations (ctx )
59
+ ntfnChan := m .cfg .NotificationManager .SubscribeReservations (runCtx )
60
60
61
61
for {
62
62
select {
63
63
case height := <- newBlockChan :
64
64
log .Debugf ("Received block %v" , height )
65
65
currentHeight = height
66
66
67
- case reservationRes := <- ntfnChan :
67
+ case reservationRes , ok := <- ntfnChan :
68
+ if ! ok {
69
+ // The channel has been closed, we'll stop the
70
+ // reservation manager.
71
+ log .Debugf ("Stopping reservation manager (ntfnChan closed)" )
72
+ return nil
73
+ }
74
+
68
75
log .Debugf ("Received reservation %x" ,
69
76
reservationRes .ReservationId )
70
77
_ , err := m .newReservation (
You can’t perform that action at this time.
0 commit comments