diff --git a/src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientProvider.java b/src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientProvider.java index b2f834773..dfc125b2a 100644 --- a/src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientProvider.java +++ b/src/main/java/com/snowflake/kafka/connector/internal/streaming/StreamingClientProvider.java @@ -142,12 +142,14 @@ public void closeClient( SnowflakeStreamingIngestClient registeredClient = this.registeredClients.getIfPresent(connectorConfig); if (registeredClient != null) { - // invalidations are processed on the next get or in the background, so we still need to close the client here + // invalidations are processed on the next get or in the background, so we still need to close + // the client here this.registeredClients.invalidate(connectorConfig); } this.streamingClientHandler.closeClient(client); - this.streamingClientHandler.closeClient(registeredClient); // in case the given client is different for some reason + this.streamingClientHandler.closeClient( + registeredClient); // in case the given client is different for some reason } public Map, SnowflakeStreamingIngestClient> getRegisteredClients() {