check empty

pull/1524/head^2
Darien Raymond 6 years ago
parent 47f1399995
commit 3b0bfe9422
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -205,6 +205,9 @@ func (w *ReceivingWorker) ReadMultiBuffer() buf.MultiBuffer {
func (w *ReceivingWorker) Read(b []byte) int { func (w *ReceivingWorker) Read(b []byte) int {
mb := w.ReadMultiBuffer() mb := w.ReadMultiBuffer()
if mb.IsEmpty() {
return 0
}
nBytes, err := mb.Read(b) nBytes, err := mb.Read(b)
common.Must(err) common.Must(err)
if !mb.IsEmpty() { if !mb.IsEmpty() {

Loading…
Cancel
Save