X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsocket.cpp;h=a6847fce15ace794a9330772acf3c3b3c4d85a20;hb=fc9e00f49299cb3b402406b5f185d5f4af1e9780;hp=c4129f67cfeff4316dcca72a19901a4f1a327eb8;hpb=1c86154cab44e718e9b37ccf857b19d5a9fc955b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/socket.cpp b/src/socket.cpp index c4129f67c..a6847fce1 100644 --- a/src/socket.cpp +++ b/src/socket.cpp @@ -177,8 +177,11 @@ int BindPorts(bool bail) else { /* Associate the new open port with a slot in the socket engine */ - ServerInstance->SE->AddFd(openSockfd[count],true,X_LISTEN); - BoundPortCount++; + if (openSockfd[count] > -1) + { + ServerInstance->SE->AddFd(openSockfd[count],true,X_LISTEN); + BoundPortCount++; + } } } return InitialPortCount + BoundPortCount;