mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-07 19:47:50 +08:00
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.
This commit is contained in:
parent
ff16b40f8c
commit
a7a4adcf8d
@ -928,6 +928,8 @@ pq_getbyte(void)
|
||||
int
|
||||
pq_peekbyte(void)
|
||||
{
|
||||
Assert(PqCommReadingMsg);
|
||||
|
||||
while (PqRecvPointer >= PqRecvLength)
|
||||
{
|
||||
if (pq_recvbuf()) /* If nothing in buffer, then recv some */
|
||||
|
Loading…
Reference in New Issue
Block a user