From 93d007a75ce37a02068e33c7182e664da5a8610c Mon Sep 17 00:00:00 2001 From: starptech Date: Mon, 18 Nov 2024 16:38:25 +0100 Subject: [PATCH] feat: detect full epoll support in sub client --- .../graphql_datasource/graphql_subscription_client.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/v2/pkg/engine/datasource/graphql_datasource/graphql_subscription_client.go b/v2/pkg/engine/datasource/graphql_datasource/graphql_subscription_client.go index 77c2c3ab3..19ac0b454 100644 --- a/v2/pkg/engine/datasource/graphql_datasource/graphql_subscription_client.go +++ b/v2/pkg/engine/datasource/graphql_datasource/graphql_subscription_client.go @@ -209,6 +209,11 @@ func NewGraphQLSubscriptionClient(httpClient, streamingClient *http.Client, engi netPollConfig: op.netPollConfiguration, } if op.netPollConfiguration.Enable { + + if netpoll.Supported() != nil { + return client + } + client.netPollState = &netPollState{ connections: make(map[int]*connection), triggers: make(map[uint64]int), @@ -229,6 +234,7 @@ func NewGraphQLSubscriptionClient(httpClient, streamingClient *http.Client, engi go client.runNetPoll(engineCtx) } } + return client }