From 0bc52497efc021add00163c02695e589110d9224 Mon Sep 17 00:00:00 2001 From: decentral1se Date: Tue, 17 Dec 2024 18:42:02 +0100 Subject: [PATCH] fix: just catch error directly --- upstreams.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/upstreams.go b/upstreams.go index 47b3f45..2aaf477 100644 --- a/upstreams.go +++ b/upstreams.go @@ -258,9 +258,7 @@ func (u *Upstreams) keepUpdated(ctx caddy.Context, conn incus.InstanceServer) { ctx.Logger().Error("event listener handler setup error", zap.Error(err)) } - chError := make(chan error, 1) - chError <- listener.Wait() - if chError != nil { + if err := listener.Wait(); err != nil { ctx.Logger().Error("event listener wait error", zap.Error(err)) }