On Windows, also call shutdown() while closing the client socket.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 7 Dec 2021 18:34:06 +0000 (13:34 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 7 Dec 2021 18:34:32 +0000 (13:34 -0500)
commit878f38b80e91ab2727b070fe5a0962820a09a33b
treee66e770a1160f5314cb187cde1362e9ae7291dc8
parent7d0229e89f4f210aa273600eef65ef45be4c11c1
On Windows, also call shutdown() while closing the client socket.

Further experimentation shows that commit 6051857fc is not sufficient
when using (some versions of?) OpenSSL.  The reason is obscure, but
calling shutdown(socket, SD_SEND) improves matters.

Per testing by Andrew Dunstan and Alexander Lakhin.
Back-patch as before.

Discussion: https://postgr.es/m/af5e0bf3-6a61-bb97-6cba-061ddf22ff6b@dunslane.net
src/backend/libpq/pqcomm.c