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 {
5656 return err
5757 }
5858
59- ntfnChan := m .cfg .NotificationManager .SubscribeReservations (ctx )
59+ ntfnChan := m .cfg .NotificationManager .SubscribeReservations (runCtx )
6060
6161 for {
6262 select {
6363 case height := <- newBlockChan :
6464 log .Debugf ("Received block %v" , height )
6565 currentHeight = height
6666
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+
6875 log .Debugf ("Received reservation %x" ,
6976 reservationRes .ReservationId )
7077 _ , err := m .newReservation (
You can’t perform that action at this time.
0 commit comments