Skip to content

Commit

Permalink
fix: broken restarting command
Browse files Browse the repository at this point in the history
  • Loading branch information
cfoust committed Jun 19, 2024
1 parent c9cfb68 commit e6a1d5a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/sessions/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package sessions

import (
"context"
"io"
"time"

P "github.com/cfoust/cy/pkg/io/protocol"
Expand Down Expand Up @@ -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
}
Expand Down

0 comments on commit e6a1d5a

Please sign in to comment.