On Windows, also call shutdown() while closing the client socket.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 23bc57d564b2dedb8b1d823a4fc71774afd9ff94
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2021-12-07T18:34:28Z
Releases: 11.15
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

Files

PathChange+/−
src/backend/libpq/pqcomm.c modified +3 −1

Discussion