From 34182bb6e7e7ed294707d8110b2c86f2958b8572 Mon Sep 17 00:00:00 2001 From: Mike <41407352+hunjixin@users.noreply.github.com> Date: Fri, 21 Jun 2024 12:17:59 +0800 Subject: [PATCH] fix: blocked error channel (#177) --- pkg/mediator/controller.go | 2 +- pkg/resourceprovider/controller.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/mediator/controller.go b/pkg/mediator/controller.go index ddc6e44c..7c201bb1 100644 --- a/pkg/mediator/controller.go +++ b/pkg/mediator/controller.go @@ -124,7 +124,7 @@ func (controller *MediatorController) subscribeToSolver() error { } func (controller *MediatorController) Start(ctx context.Context, cm *system.CleanupManager) chan error { - errorChan := make(chan error) + errorChan := make(chan error, 1) // get the local subscriptions setup err := controller.subscribeToSolver() if err != nil { diff --git a/pkg/resourceprovider/controller.go b/pkg/resourceprovider/controller.go index 456e1a2c..87d8645c 100644 --- a/pkg/resourceprovider/controller.go +++ b/pkg/resourceprovider/controller.go @@ -124,7 +124,7 @@ func (controller *ResourceProviderController) subscribeToWeb3() error { } func (controller *ResourceProviderController) Start(ctx context.Context, cm *system.CleanupManager) chan error { - errorChan := make(chan error) + errorChan := make(chan error, 1) err := controller.subscribeToSolver() if err != nil { errorChan <- err