]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/socket.cpp
Add userrec::HasMode, fix some typos.
[user/henk/code/inspircd.git] / src / socket.cpp
index c4129f67cfeff4316dcca72a19901a4f1a327eb8..a6847fce15ace794a9330772acf3c3b3c4d85a20 100644 (file)
@@ -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;