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

testen

parent dc76e9f2
Loading
Loading
Loading
Loading
+4 −5
Changes for src/event/epoll.cpp: 4 added lines, 5 removed lines.
Original line number Diff line number Diff line
@@ -214,13 +214,13 @@ namespace netplus {
            con *rcon =  reinterpret_cast<con*>(_Events[pos].data.ptr);
            buffer buf(BLOCKSIZE);

            if (!_Events[pos].data.ptr || !rcon->csock) {
            if (!rcon || !rcon->csock) {
                return;
            }

            std::lock_guard<std::mutex> lock_guard(rcon->event_mutex);

            if (!rcon || !rcon->csock) { return; }
            if (!rcon->csock) { return; }

            try{

@@ -259,7 +259,7 @@ namespace netplus {

            std::lock_guard<std::mutex> lock_guard(wcon->event_mutex);

            if (!_Events[pos].data.ptr || !wcon->csock) { return; }
            if (!wcon->csock) { return; }

            try{
                evconnection->ResponseEvent(*wcon,tid,args);
@@ -307,7 +307,7 @@ namespace netplus {
            {
                std::lock_guard<std::mutex> lock(ccon->event_mutex);

                if (!_Events[pos].data.ptr && ccon->csock) {
                if (ccon->csock) {
                    try {
                        if (epoll_ctl(_pollFD, EPOLL_CTL_DEL, ccon->csock->fd(), nullptr) < 0) {
                            NetException except;
@@ -328,7 +328,6 @@ namespace netplus {
                CONNECTIONS.erase(ccon->csock->fd());
            }

            if(!_Events[pos].data.ptr)
            delete ccon;
        }

+2 −2
Changes for src/event/kqueue.cpp: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -234,7 +234,7 @@ namespace netplus {

            std::lock_guard<std::mutex> lock_guard(rcon->event_mutex);

            if (!rcon->csock) { return; }
            if (!_Events[pos].udata || !rcon->csock) { return; }

            try{

@@ -273,7 +273,7 @@ namespace netplus {

            std::lock_guard<std::mutex> lock_guard(wcon->event_mutex);

            if (!wcon->csock) { return; }
            if (!_Events[pos].udata || !wcon->csock) { return; }

            try{
                evconnection->ResponseEvent(*wcon,tid,args);