mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
check socket creation errors against PGINVALID_SOCKET
Previously, in some places, socket creation errors were checked for negative values, which is not true for Windows because sockets are unsigned. This masked socket creation errors on Windows. Backpatch through 9.0. 8.4 doesn't have the infrastructure to fix this.
This commit is contained in:
@ -132,7 +132,7 @@ int
|
||||
pgwin32_waitforsinglesocket(SOCKET s, int what, int timeout)
|
||||
{
|
||||
static HANDLE waitevent = INVALID_HANDLE_VALUE;
|
||||
static SOCKET current_socket = -1;
|
||||
static SOCKET current_socket = INVALID_SOCKET;
|
||||
static int isUDP = 0;
|
||||
HANDLE events[2];
|
||||
int r;
|
||||
|
Reference in New Issue
Block a user