diff --git a/pkg/sessions/events.go b/pkg/sessions/events.go index 3465cabb..12c764cc 100644 --- a/pkg/sessions/events.go +++ b/pkg/sessions/events.go @@ -2,6 +2,7 @@ package sessions import ( "context" + "io" "time" P "github.com/cfoust/cy/pkg/io/protocol" @@ -43,6 +44,11 @@ func (s *EventStream) Write(data []byte) (n int, err error) { func (s *EventStream) Read(p []byte) (n int, err error) { n, err = s.stream.Read(p) + + if n == 0 || err == io.EOF { + return n, nil + } + if err != nil { return n, err }