All connections to the API server are given a timeout (and there is a
maximum).  Also, any intervening proxy could be set with a lower
connection timeout.

I can't remember whether the API server timeout should be returning an
error.  But you definitely will have an upper bound on watch duration.

> On Nov 18, 2016, at 5:12 PM, John Mazzitelli <[email protected]> wrote:
>
> 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

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

Reply via email to