Fix WriteTo receive loop

This commit is contained in:
Andy Wang 2020-05-27 13:41:11 +01:00
parent 128f653ea4
commit 501f7dda97
2 changed files with 2 additions and 4 deletions

View File

@ -92,9 +92,8 @@ func (p *bufferedPipe) WriteTo(w io.Writer) (n int64, err error) {
return n, er
}
p.rwCond.Broadcast()
} else {
p.rwCond.Wait()
}
p.rwCond.Wait()
}
}

View File

@ -98,9 +98,8 @@ func (d *datagramBuffer) WriteTo(w io.Writer) (n int64, err error) {
return n, er
}
d.rwCond.Broadcast()
} else {
d.rwCond.Wait()
}
d.rwCond.Wait()
}
}