Revert "Fix WriteTo receive loop"

This reverts commit 501f7dda

Address #117
This commit is contained in:
Andy Wang 2020-06-07 12:16:08 +01:00
parent aed624a87b
commit ff10cbf67b
2 changed files with 4 additions and 2 deletions

View File

@ -92,9 +92,10 @@ func (p *bufferedPipe) WriteTo(w io.Writer) (n int64, err error) {
return n, er
}
p.rwCond.Broadcast()
}
} else {
p.rwCond.Wait()
}
}
}
func (p *bufferedPipe) Write(input []byte) (int, error) {

View File

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