Skip to content

Commit

Permalink
snowpipe: fix cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rockwotj committed Dec 9, 2024
1 parent b71475a commit e5423ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/impl/snowflake/output_snowflake_streaming.go
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ const SnowflakeClientResourceForTesting snowflakeClientForTesting = "SnowflakeCl

type snowpipeStreamingOutput struct {
initStatementsFn func(context.Context, *streaming.SnowflakeRestClient) error
client *streaming.SnowflakeServiceClient
restClient *streaming.SnowflakeRestClient
mapping *bloblang.Executor
logger *service.Logger
Expand Down Expand Up @@ -695,7 +694,6 @@ func (o *snowpipeStreamingOutput) Close(ctx context.Context) error {
return err
}
o.restClient.Close()
o.client.Close()
return nil
}

Expand Down Expand Up @@ -785,6 +783,7 @@ func (o *snowpipePooledOutput) WriteBatch(ctx context.Context, batch service.Mes

func (o *snowpipePooledOutput) Close(ctx context.Context) error {
o.channelPool.Reset()
o.client.Close()
return nil
}

Expand Down Expand Up @@ -872,6 +871,7 @@ func (o *snowpipeIndexedOutput) WriteBatch(ctx context.Context, batch service.Me

func (o *snowpipeIndexedOutput) Close(ctx context.Context) error {
o.channelPool.Reset()
o.client.Close()
return nil
}

Expand Down

0 comments on commit e5423ce

Please sign in to comment.