Skip to content

Commit a7a4adc

Browse files
committed
Assert(PqCommReadingMsg) in pq_peekbyte().
Interrupting pq_recvbuf() can break protocol sync, so its callers all deserve this assertion. The one pq_peekbyte() caller suffices already.
1 parent ff16b40 commit a7a4adc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/libpq/pqcomm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -928,6 +928,8 @@ pq_getbyte(void)
928928
int
929929
pq_peekbyte(void)
930930
{
931+
Assert(PqCommReadingMsg);
932+
931933
while (PqRecvPointer >= PqRecvLength)
932934
{
933935
if (pq_recvbuf()) /* If nothing in buffer, then recv some */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy