Browse Source

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

Corey Smith 4 năm trước cách đây
mục cha
commit
dcdbeac267
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  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