瀏覽代碼

endPage: read next packet if we are already at the end of the buffer

Corey Smith 4 年之前
父節點
當前提交
dcdbeac267
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/backend.go

+ 3 - 0
src/backend.go

@@ -113,6 +113,9 @@ readPackets:
 					log.Println("Requesting next page...")
 					i += 1
 					sendPacket(socket, []byte(formats.nextPageRequest))
+					if i >= len(scanBytes) {
+						continue readPackets
+					}
 				} else if scanBytes[i] == scanner.startGray {
 					if i + 2 >= len(scanBytes) {
 						continue readPackets