]> granicus.if.org Git - python/commitdiff
Issue #14300: Under Windows, sockets created using socket.dup() now allow overlapped...
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 31 Mar 2012 23:14:39 +0000 (01:14 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 31 Mar 2012 23:14:39 +0000 (01:14 +0200)
Patch by sbt.

Misc/NEWS
Modules/socketmodule.c

index 342385618d9acbaf81a239a0bdd96e7b21d71e68..a893f6b6c6435234dbde8896854faaa164fca514 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -37,6 +37,9 @@ Core and Builtins
 Library
 -------
 
+- Issue #14300: Under Windows, sockets created using socket.dup() now allow
+  overlapped I/O.  Patch by sbt.
+
 - Issue #13872: socket.detach() now marks the socket closed (as mirrored
   in the socket repr()).  Patch by Matt Joiner.
 
index d741d2cc4812db9adca01872d3f422cc5d0f8533..59a2f285774a175e23db07b0cf88af7ecdefacf4 100644 (file)
@@ -381,7 +381,7 @@ dup_socket(SOCKET handle)
         return INVALID_SOCKET;
 
     return WSASocket(FROM_PROTOCOL_INFO, FROM_PROTOCOL_INFO,
-                     FROM_PROTOCOL_INFO, &info, 0, 0);
+                     FROM_PROTOCOL_INFO, &info, 0, WSA_FLAG_OVERLAPPED);
 }
 #define SOCKETCLOSE closesocket
 #else