mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-09 12:58:22 +02:00
connect/client: ignore unknown message types (#5223)
This commit is contained in:
parent
45cf7a3969
commit
15dc77e19d
1 changed files with 2 additions and 1 deletions
|
@ -9,6 +9,7 @@ import (
|
||||||
|
|
||||||
"github.com/pomerium/pomerium/internal/zero/apierror"
|
"github.com/pomerium/pomerium/internal/zero/apierror"
|
||||||
"github.com/pomerium/pomerium/pkg/zero/connect"
|
"github.com/pomerium/pomerium/pkg/zero/connect"
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Watch watches for changes to the config until either context is canceled,
|
// Watch watches for changes to the config until either context is canceled,
|
||||||
|
@ -54,7 +55,7 @@ func dispatch(ctx context.Context, cfg *config, msg message) error {
|
||||||
case *connect.Message_TelemetryRequest:
|
case *connect.Message_TelemetryRequest:
|
||||||
cfg.onTelemetryRequested(ctx, msg.Message.GetTelemetryRequest())
|
cfg.onTelemetryRequested(ctx, msg.Message.GetTelemetryRequest())
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unknown message type")
|
log.Ctx(ctx).Debug().Msg("unknown message type, ignored")
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
return fmt.Errorf("unknown message payload")
|
return fmt.Errorf("unknown message payload")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue