Skip to content

Commit

Permalink
rev
Browse files Browse the repository at this point in the history
  • Loading branch information
xacrimon committed Mar 9, 2022
1 parent 9d8777f commit 62c2eb0
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions lib/srv/termmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,19 +145,16 @@ func (g *TermManager) Read(p []byte) (int, error) {
}
}()

wait := func() {
for !<-c {
}
}

on := <-c
for {
wait()
if !on {
on = <-c
continue
}

select {
case on := <-c:
if !on {
continue
}
case on = <-c:
continue
case g.remaining = <-g.incoming:
close(q)
n := copy(p, g.remaining)
Expand Down

0 comments on commit 62c2eb0

Please sign in to comment.