Skip to content

Commit a458b02

Browse files
committed
BUG 34779073 - C++ request timeouts after unexpected socket input return of WSA_IO_PENDING
[git-p4: depot-paths = "//dev/main.cpp/": change = 101929]
1 parent 975a307 commit a458b02

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

include/private/coherence/native/windows/WindowsSocket.hpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/*
2-
* Copyright (c) 2000, 2020, Oracle and/or its affiliates.
2+
* Copyright (c) 2000, 2023, Oracle and/or its affiliates.
33
*
44
* Licensed under the Universal Permissive License v 1.0 as shown at
5-
* http://oss.oracle.com/licenses/upl.
5+
* https://oss.oracle.com/licenses/upl.
66
*/
77
#ifndef COH_WINDOWS_SOCKET_HPP
88
#define COH_WINDOWS_SOCKET_HPP
@@ -309,9 +309,6 @@ class COH_EXPORT WindowsSocket
309309
int nError = WSAGetLastError();
310310
switch (nError)
311311
{
312-
case WSA_IO_PENDING: // Bug 25237462 - we should not get WSA_IO_PENDING. Handle as a soft error
313-
COH_LOG("Handling unexpected socket " << (chan == channel_in ? "input" : "output") << " return of WSA_IO_PENDING as WSAEWOULDBLOCK", 9);
314-
// fall through
315312
case WSAEWOULDBLOCK:
316313
case WSAEINTR:
317314
case WSAEINPROGRESS:
@@ -587,7 +584,9 @@ class COH_EXPORT WindowsSocket
587584
: fIn ? SD_RECEIVE : SD_SEND))
588585
{
589586
int nError = WSAGetLastError();
590-
if (fConnectError || nError != WSAENOTCONN)
587+
if (fConnectError ||
588+
(nError != WSAENOTCONN &&
589+
nError != WSAECONNRESET))
591590
{
592591
COH_THROW_ERRNO(nError, "Socket shutdown failed");
593592
}

0 commit comments

Comments
 (0)