index 318979342ebb593514ec6aac0ffbdc0b25813f6a..844a5dea1def123b6a9c8a75e2bd311c775bd92b 100644 (file)
* possibly are waiting for a later location. So we send pings
* containing the flush location every now and then.
*/
- if (MyWalSnd->flush < sentPtr && !waiting_for_ping_response)
+ if (MyWalSnd->flush < sentPtr &&
+ MyWalSnd->write < sentPtr &&
+ !waiting_for_ping_response)
{
- WalSndKeepalive(true);
+ WalSndKeepalive(false);
waiting_for_ping_response = true;
}