Skip to content

Commit ad8b0bc

Browse files
committed
fix: errorPtr only when necesarry
1 parent d29be3a commit ad8b0bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

operator/pkg/operator.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,14 +236,14 @@ func (o *Operator) Start(ctx context.Context) error {
236236
o.Logger.Errorf("Metrics server failed", "err", err)
237237
case errorPair := <-subV2ErrorChannel:
238238
o.Logger.Infof("Error in websocket subscription", "err", errorPair)
239-
errorPair = o.SubscribeToNewTasksV2(subV2ErrorChannel)
240-
if errorPair != nil {
239+
errorPairPtr := o.SubscribeToNewTasksV2(subV2ErrorChannel)
240+
if errorPairPtr != nil {
241241
o.Logger.Fatal("Could not subscribe to new tasks V2")
242242
}
243243
case errorPair := <-subV3ErrorChannel:
244244
o.Logger.Infof("Error in websocket subscription", "err", errorPair)
245-
errorPair = o.SubscribeToNewTasksV3(subV3ErrorChannel)
246-
if errorPair != nil {
245+
errorPairPtr := o.SubscribeToNewTasksV3(subV3ErrorChannel)
246+
if errorPairPtr != nil {
247247
o.Logger.Fatal("Could not subscribe to new tasks V3")
248248
}
249249
case newBatchLogV2 := <-o.NewTaskCreatedChanV2:

0 commit comments

Comments
 (0)