Przeglądaj źródła

Fixing recv window updates for direct buffer

Armon Dadgar 10 lat temu
rodzic
commit
89cddd2869
1 zmienionych plików z 4 dodań i 2 usunięć
  1. 4 2
      stream.go

+ 4 - 2
stream.go

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