Wait for secret controller to finish synchronizing.

Prevents a race on closing the events channel, possibly leading to a
double-close.
This commit is contained in:
Timo Reimann 2017-06-28 00:21:08 +02:00 committed by Ludovic Fernandez
parent 9fbe21c534
commit c5c63071ca

View file

@ -263,7 +263,7 @@ func (c *clientImpl) WatchAll(labelSelector string, stopCh <-chan struct{}) (<-c
// fireEvent checks if all controllers have synced before firing
// Used after startup or a reconnect
func (c *clientImpl) fireEvent(event interface{}, eventCh chan interface{}) {
if !c.ingController.HasSynced() || !c.svcController.HasSynced() || !c.epController.HasSynced() {
if !c.ingController.HasSynced() || !c.svcController.HasSynced() || !c.epController.HasSynced() || !c.secController.HasSynced() {
return
}
eventHandlerFunc(eventCh, event)