Commit 2901506c authored by jan.koester's avatar jan.koester
Browse files

test

parent 778d7121
Loading
Loading
Loading
Loading
+7 −1
Changes for src/event/kqueue.cpp: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -232,6 +232,12 @@ namespace netplus {

                rcon->lasteventime = time(nullptr);

                // 🚨 FIX: Check for graceful shutdown (0 bytes read)
                if (rcvsize == 0) {
                    CloseEventHandler(pos, tid, args);
                    return; // Connection closed, exit handler
                }

                if(rcvsize>0){
                    rcon->RecvData.append(buf.data.buf,rcvsize);
                }
@@ -252,7 +258,7 @@ namespace netplus {
                }
                throw e;
            }
        };
        }

        void WriteEventHandler(int pos,const int tid,ULONG_PTR args) {
            con *wcon = (con*)_Events[pos].udata;