mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-10 12:32:03 +00:00
fix bug of closing the same channel multiple times
This commit is contained in:
parent
124fb610dc
commit
9fe0b88f92
@ -108,7 +108,6 @@ func (c *EndpointsConfig) Channel(source string) chan EndpointsUpdate {
|
|||||||
for update := range endpointsCh {
|
for update := range endpointsCh {
|
||||||
ch <- update
|
ch <- update
|
||||||
}
|
}
|
||||||
close(ch)
|
|
||||||
}()
|
}()
|
||||||
return endpointsCh
|
return endpointsCh
|
||||||
}
|
}
|
||||||
@ -217,7 +216,6 @@ func (c *ServiceConfig) Channel(source string) chan ServiceUpdate {
|
|||||||
for update := range serviceCh {
|
for update := range serviceCh {
|
||||||
ch <- update
|
ch <- update
|
||||||
}
|
}
|
||||||
close(ch)
|
|
||||||
}()
|
}()
|
||||||
return serviceCh
|
return serviceCh
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user