Commit feb21e56 authored by jan.koester's avatar jan.koester
Browse files

test

parent e59f77fa
Loading
Loading
Loading
Loading
+8 −1
Changes for src/event/epoll.cpp: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -172,6 +172,13 @@ namespace netplus {

            evconnection->CreateConnection(ccon);

             if(!ccon){
                char errstr[255];
                strerror_r_netplus(errno,errstr,255);
                std::cerr << "ConnectEventHandler: Failed to accept connection or invalid socket: " << errstr << std::endl;
                return;
            }

            if(_ServerSocket->_Type==sockettype::TCP){
                ccon->csock=std::make_unique<tcp>(-1);
            }else if(_ServerSocket->_Type==sockettype::UDP){
@@ -180,7 +187,7 @@ namespace netplus {
                // clt->connection->csock=std::make_unique<ssl>( -1);
            }

            if (!ccon || !ccon->csock || ccon->csock->fd() < 0) {
            if (!ccon->csock || ccon->csock->fd() < 0) {
                 // The connection failed to establish or the socket is invalid.
                 // Clean up and return, perhaps log an error.
                 char errstr[255];
+8 −1
Changes for src/event/kqueue.cpp: 8 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -176,6 +176,13 @@ namespace netplus {

            evconnection->CreateConnection(ccon);

            if(!ccon){
                char errstr[255];
                strerror_r_netplus(errno,errstr,255);
                std::cerr << "ConnectEventHandler: Failed to accept connection or invalid socket: " << errstr << std::endl;
                return;
            }

            if(_ServerSocket->_Type==sockettype::TCP){
                ccon->csock=std::make_unique<tcp>(-1);
            }else if(_ServerSocket->_Type==sockettype::UDP){
@@ -184,7 +191,7 @@ namespace netplus {
                // clt->connection->csock=std::make_unique<ssl>( -1);
            }

            if (!ccon || !ccon->csock || ccon->csock->fd() < 0) {
            if (!ccon->csock || ccon->csock->fd() < 0) {
                 // The connection failed to establish or the socket is invalid.
                 // Clean up and return, perhaps log an error.
                 char errstr[255];