Per suggestion I'm reposting this as the answer.
Thanks for everyone's guidance I was able to solve this issue. I was calling WSAStartup
and WSACleanup
an uneven amount of times. When the extra WSACleanup
hits, it closes all sockets across all threads for the application (see MSDN documentation).
In a multithreaded environment, WSACleanup terminates Windows Sockets operations for all threads.
I added a simple static counter around each to startup (++) and would all call cleanup if the counter was >0. Problem solved.
Hope this helps others.