X-Git-Url: http://git.tdb.fi/?p=libs%2Fnet.git;a=blobdiff_plain;f=source%2Fnet%2Fwindows%2Fsocket.cpp;fp=source%2Fnet%2Fwindows%2Fsocket.cpp;h=eadc22af3a2de5355c349d16e201f8d1ec01b032;hp=07db95d1f7dd928ab357d645754a05d4b899a6b4;hb=6057616e00a6792e219fab2ce958306e737faa67;hpb=63432878fc84bc666bb74efaeee588fa6d03d5b2 diff --git a/source/net/windows/socket.cpp b/source/net/windows/socket.cpp index 07db95d..eadc22a 100644 --- a/source/net/windows/socket.cpp +++ b/source/net/windows/socket.cpp @@ -27,7 +27,7 @@ public: } }; -WinSockHelper wsh; +unique_ptr wsh; } @@ -37,6 +37,8 @@ namespace Net { void Socket::platform_init() { + if(!wsh) + wsh = make_unique(); *priv->event = CreateEvent(0, false, false, 0); }