Skip to content

Commit 8695d83

Browse files
committed
initial review comments from Arjan
1 parent 54c1664 commit 8695d83

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

internal/xds/clients/internal/buffer/unbounded.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ func (b *Unbounded) Reset() {
129129
return
130130
}
131131

132-
b.backlog = nil
132+
b.backlog = b.backlog[:0]
133133
select {
134134
case <-b.c:
135135
default:

internal/xds/clients/xdsclient/ads_stream.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,11 @@ func (s *adsStreamImpl) subscribe(typ ResourceType, name string) {
189189
s.requestCh.Put(request{typ: typ, resourceNames: resourceNames(state.subscribedResources)})
190190
}
191191

192-
// Unsubscribe cancels the subscription to the given resource. It is a no-op if
192+
// unsubscribe cancels the subscription to the given resource. It is a no-op if
193193
// the given resource does not exist. The watch expiry timer associated with the
194194
// resource is stopped if one is active. A discovery request is sent out on the
195195
// stream for the resource type with the updated set of resource names.
196-
func (s *adsStreamImpl) Unsubscribe(typ ResourceType, name string) {
196+
func (s *adsStreamImpl) unsubscribe(typ ResourceType, name string) {
197197
if s.logger.V(2) {
198198
s.logger.Infof("Unsubscribing to resource %q of type %q", name, typ.TypeName)
199199
}

internal/xds/clients/xdsclient/channel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ func (xc *xdsChannel) unsubscribe(typ ResourceType, name string) {
163163
}
164164
return
165165
}
166-
xc.ads.Unsubscribe(typ, name)
166+
xc.ads.unsubscribe(typ, name)
167167
}
168168

169169
// The following onADSXxx() methods implement the StreamEventHandler interface

0 commit comments

Comments
 (0)