Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Commit f5d9954

Browse files
committed
Close watch channel when context is done
1 parent 7973a13 commit f5d9954

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ func restConfigForAPIExport(ctx context.Context, cfg *rest.Config, apiExportName
190190
for {
191191
select {
192192
case <-ctx.Done():
193+
watch.Stop()
193194
return nil, ctx.Err()
194195
case e, ok := <-watch.ResultChan():
195196
if !ok {

0 commit comments

Comments
 (0)