Prechádzať zdrojové kódy

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

Corey Smith 4 rokov pred
rodič
commit
dcdbeac267
1 zmenil súbory, kde vykonal 3 pridanie a 0 odobranie
  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