I have a watcher setup:

====
   func watch() {
      fieldSelector := fields.OneTermEqualSelector("spec.nodeName", nodeName)
      listOptions := api.ListOptions{Watch: true, FieldSelector: fieldSelector }
      watcher, err := d.Client.Pods(v1.NamespaceAll).Watch(listOptions)

      go func() {
         for event := range watcher.ResultChan() { // <-- why does this chan 
close sometimes?
            ...
         }
      }
   }
====

And this works most of the time. But every now and then that watcher.ResultChan 
gets closed and breaks the for-loop. But at no time did my code actually close 
the watcher. It just closes for some unknown reason that I've yet to replicate.

Has anyone seen this before? A watcher channel just closing for no apparent 
reason?

Under what conditions would a watcher like this close? Maybe there is some 
condition that I am not aware of where the watcher channel will close (again, 
MY code doesn't call Close() though).

_______________________________________________
users mailing list
[email protected]
http://lists.openshift.redhat.com/openshiftmm/listinfo/users

Reply via email to