aboutsummaryrefslogtreecommitdiff
path: root/src/backend/port/win32/socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/port/win32/socket.c')
-rw-r--r--src/backend/port/win32/socket.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/backend/port/win32/socket.c b/src/backend/port/win32/socket.c
index af151e84709..70592afe54e 100644
--- a/src/backend/port/win32/socket.c
+++ b/src/backend/port/win32/socket.c
@@ -47,8 +47,8 @@ int pgwin32_noblock = 0;
*
* Note: where there is a direct correspondence between a WSAxxx error code
* and a Berkeley error symbol, this mapping is actually a no-op, because
- * in win32.h we redefine the network-related Berkeley error symbols to have
- * the values of their WSAxxx counterparts. The point of the switch is
+ * in win32_port.h we redefine the network-related Berkeley error symbols to
+ * have the values of their WSAxxx counterparts. The point of the switch is
* mostly to translate near-miss error codes into something that's sensible
* in the Berkeley universe.
*/
@@ -141,10 +141,15 @@ TranslateSocketError(void)
case WSAEDISCON:
errno = ENOTCONN;
break;
+ case WSAETIMEDOUT:
+ errno = ETIMEDOUT;
+ break;
default:
ereport(NOTICE,
- (errmsg_internal("unrecognized win32 socket error code: %d", WSAGetLastError())));
+ (errmsg_internal("unrecognized win32 socket error code: %d",
+ WSAGetLastError())));
errno = EINVAL;
+ break;
}
}