-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialization problems on Windows #1123 #1127
base: master
Are you sure you want to change the base?
Initialization problems on Windows #1123 #1127
Conversation
I have no idea why some of the Pipelines fail. |
Some of the Pipelines are broken at this time because they keep changing the Pipelines machines out from underneath us; your change doesn't look to be the cause of that. That said, I'm a bit concerned because you have put an Can you describe the problem you're trying to solve here more directly and why we don't see it in any form of testing? Why does the exact same solution already in use by winsock_init.hpp you mention not already resolve this problem? |
Hey, sorry for the delayed reply. I somehow missed the notification on this one. First off all yes, the inserted block is at the wrong position and should be moved out of the But let me describe the problem that i try to solve in more detail.
An other way of fixing this issue would be to make sure that winsock_init.hpp does not get included in the code, but it is included via various headers of asio and do not know if it is possible to include the header you need without including winsock_init.hpp. And even if it is possible the problem could easily reappear if asio changes some includes internally. |
If the problem is that you can't call WSAStartup inside DllMain, I can see how that might spell doom -- however, this change doesn't actually achieve that. The constructor for this |
Sorry, I should have mentioned what the If you want to you can have a look at the implementation here: |
I see. In that case how does WSAStartup get called? |
add manual initialization of winsock
fix winsock_init_helper - uppercase template arguments
Well yes, I missed the manual init. |
add comments
Fix static variable init Fix ifdef
I think I have solved the issues with it. Any chance to get this merged? |
Can you merge with |
This prevent pplx to initialize Winsock from a global object by initialize it manuell.
This is required since it creates problems if you call WSAStartup in DLLMain.
The fix I used is proposed in the winsock_init.hpp of boost asio.