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

added forgotten unlock

parent 1ebb4059
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -112,6 +112,7 @@ namespace netplus {
    }

    unsigned int poll::waitEventHandler() {
        const std::lock_guard<std::mutex> lock(_StateLock);
        int ret = epoll_wait(_pollFD, (struct epoll_event*)_Events, _ServerSocket->getMaxconnections(), -1);
        if (ret == -1) {
            NetException exception;
@@ -142,6 +143,7 @@ namespace netplus {
            ccon->csock->getAddress(ip);
            std::cout << "Connected: " << ip  << std::endl;
            ConnectEvent(ccon);
            ccon->conlock.unlock();
        } catch (NetException& e) {
            ccon->conlock.unlock();
            delete ccon->csock;