fix: just catch error directly

This commit is contained in:
decentral1se 2024-12-17 18:42:02 +01:00
parent 417f44bc78
commit 0bc52497ef
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410

View File

@ -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))
}