Skip to content

Commit

Permalink
watch/iowatcher should log non EOF errors encountered
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Sep 22, 2014
1 parent 9a0add3 commit 6778a8d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/watch/iowatcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ limitations under the License.
package watch

import (
"io"
"sync"

"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
"github.com/golang/glog"
)

// Decoder allows StreamWatcher to watch any stream for which a Decoder can be written.
Expand Down Expand Up @@ -82,6 +84,9 @@ func (sw *StreamWatcher) receive() {
for {
action, obj, err := sw.source.Decode()
if err != nil {
if err != io.EOF {
glog.Errorf("Unable to decode an event from the watch stream: %v", err)
}
return
}
sw.result <- Event{
Expand Down

0 comments on commit 6778a8d

Please sign in to comment.