Author: andrewjlawrence
Branch: winoverlapped
Changeset: r96335:727888c771e9
Date: 2019-03-17 20:24 +0000
http://bitbucket.org/pypy/pypy/changeset/727888c771e9/

Log:    Ensure that WSAStartup is called.

diff --git a/lib_pypy/_overlapped.py b/lib_pypy/_overlapped.py
--- a/lib_pypy/_overlapped.py
+++ b/lib_pypy/_overlapped.py
@@ -111,6 +111,8 @@
 
 
 def initiailize_function_ptrs():
+    ## importing socket ensures that WSAStartup() is called
+    import _socket
     s = _winsock2.socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)
     dwBytes = _ffi.new("DWORD[1]", [0])
     if s == INVALID_SOCKET:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to