|
@@ -132,12 +132,14 @@ WAIT:
|
|
select {
|
|
select {
|
|
case <-s.recvNotifyCh:
|
|
case <-s.recvNotifyCh:
|
|
if dBuf != nil && dBuf.bytes > 0 {
|
|
if dBuf != nil && dBuf.bytes > 0 {
|
|
- return dBuf.bytes, nil
|
|
|
|
|
|
+ err = s.sendWindowUpdate()
|
|
|
|
+ return dBuf.bytes, err
|
|
}
|
|
}
|
|
goto START
|
|
goto START
|
|
case <-timeout:
|
|
case <-timeout:
|
|
if dBuf != nil && dBuf.bytes > 0 {
|
|
if dBuf != nil && dBuf.bytes > 0 {
|
|
- return dBuf.bytes, nil
|
|
|
|
|
|
+ err = s.sendWindowUpdate()
|
|
|
|
+ return dBuf.bytes, err
|
|
}
|
|
}
|
|
return 0, ErrTimeout
|
|
return 0, ErrTimeout
|
|
}
|
|
}
|