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

some fixes

parent e8fc3787
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -205,8 +205,6 @@ namespace netplus {
        void ReadEventHandler(int pos,const int tid,void *args) {
            con *rcon = (con*)_Events[pos].data.ptr;

            if(!rcon)
                assert(0);
            try{
                char buf[BLOCKSIZE];
                size_t rcvsize = _ServerSocket->recvData(rcon->csock, buf, BLOCKSIZE);
@@ -278,12 +276,9 @@ namespace netplus {
        void CloseEventHandler(int pos,const int tid,void *args) {
            con *ccon = (con*)_Events[pos].data.ptr;

            if(!ccon)
                return;

            try{

                if(epoll_ctl(_pollFD, EPOLL_CTL_DEL,ccon->csock->fd(), 0)<0){
                if(epoll_ctl(_pollFD, EPOLL_CTL_DEL,ccon->csock->fd(), nullptr)<0){
                    NetException except;
                    char errstr[255];
                    strerror_r_netplus(errno,errstr,255);
+3 −2
Original line number Diff line number Diff line
@@ -123,7 +123,6 @@ netplus::tcp::tcp(const char* addr, int port,int maxconnections,int sockopts) :
}

netplus::tcp::~tcp(){
    if(_Socket>=0)
    ::close(_Socket);
    ::free(_SocketPtr);
}
@@ -213,8 +212,10 @@ size_t netplus::tcp::sendData(socket *csock, void* data, unsigned long size,int
                     );
    if(rval<0){
        int etype=NetException::Error;

        if(errno==EAGAIN)
            etype=NetException::Note;

        char errstr[512];
        strerror_r_netplus(errno,errstr,512);