Skip to content

Commit

Permalink
Fix base reader
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniomika committed Nov 17, 2024
1 parent 6372620 commit a32d467
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pipe/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func Base(ctx context.Context, logger *slog.Logger, info *SSHClientInfo, id, cmd
return nil, err
}

session, err := client.AddSession(id, cmd, 0, 0, 0)
session, err := client.AddSession(id, cmd, 100, -1, -1)
if err != nil {
return nil, err
}
Expand Down
4 changes: 3 additions & 1 deletion pipe/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ func (s *Session) Start() {
n, err := s.StdoutPipe.Read(data)

select {
case s.Out <- SendData{Data: slices.Clone(data[:n]), N: n, Error: err}:
case s.Out <- SendData{Data: data[:n], N: n, Error: err}:
break
case <-s.Done:
s.broadcastDone()
Expand Down Expand Up @@ -287,5 +287,7 @@ func (s *Session) broadcastDone() {
break
case <-s.Client.CtxDone:
break
default:
break
}
}

0 comments on commit a32d467

Please sign in to comment.