소스 검색

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