Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
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

+2
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)