Skip to content

Commit

Permalink
fix(kds): remove context from map on stream close
Browse files Browse the repository at this point in the history
Signed-off-by: Lukasz Dziedziak <[email protected]>
  • Loading branch information
lukidzi committed Dec 11, 2024
1 parent 86fd97e commit e02711e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/kds/v2/server/tenant_callback.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"errors"
"sync"

envoy_core "github.com/envoyproxy/go-control-plane/envoy/config/core/v3"
envoy_sd "github.com/envoyproxy/go-control-plane/envoy/service/discovery/v3"
envoy_xds "github.com/envoyproxy/go-control-plane/pkg/server/v3"

Expand Down Expand Up @@ -50,3 +51,9 @@ func (c *tenancyCallbacks) OnStreamDeltaRequest(streamID int64, request *envoy_s
util.FillTenantMetadata(tenantID, request.Node)
return nil
}

func (c *tenancyCallbacks) OnDeltaStreamClosed(streamID int64, node *envoy_core.Node) {
c.Lock()
delete(c.streamToCtx, streamID)
c.Unlock()
}

0 comments on commit e02711e

Please sign in to comment.