Commit 9d830348 authored by jan.koester's avatar jan.koester
Browse files

fixed

parent 7f911ea5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -73,7 +73,7 @@ namespace netplus {
            void                    *_Extension;
            static std::atomic<int>  _InitCount;
#ifdef Windows
            WSAData            *_WSAData;
            WSAData                  _WSAData;
#endif // Windows
        };
        
+1 −3
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ netplus::socket::socket(){
    _SocketPtr=nullptr;
    _Type=-1;
    if (_InitCount<1) {
        if (WSAStartup(MAKEWORD(2, 2), _WSAData) != 0) {
        if (WSAStartup(MAKEWORD(2, 2), &_WSAData) != 0) {
            NetException exception;
            exception[NetException::Critical] << "socket: WSAStartup failed: ";
        }
@@ -66,8 +66,6 @@ netplus::socket::~socket(){
    int zero = 0;
    if (_InitCount.compare_exchange_strong(zero, std::memory_order_release)) {
        WSACleanup();
        delete _WSAData;
        _WSAData = nullptr;
    }
}