Is it a bug?
-
hi,victor
netxms 1.1.6 in /src/server/core/Client.cpp::ClientListener()while(!IsShutdownInProgress()) { iSize = sizeof(struct sockaddr_in); if ((sockClient = accept(sock, (struct sockaddr *)&servAddr, &iSize)) == -1) { int error; #ifdef _WIN32 error = WSAGetLastError(); if (error != WSAEINTR) #else error = errno; if (error != EINTR) #endif nxlog_write(MSG_ACCEPT_ERROR, EVENTLOG_ERROR_TYPE, "e", error); errorCount++; if (errorCount > 1000) { nxlog_write(MSG_TOO_MANY_ACCEPT_ERRORS, EVENTLOG_WARNING_TYPE, NULL); errorCount = 0; } ThreadSleepMs(500); } errorCount = 0; // Reset consecutive errors counter // Create new session structure and threads pSession = new ClientSession(sockClient, (struct sockaddr *)&servAddr); if (!RegisterSession(pSession)) { delete pSession; } else { pSession->run(); }when accept error, The sockClient is -1, Then ThreadSleepMs(500); but it will continue to create ClientSession with the wrong sockClient .
Don't it we should insert " continue; " after ThreadSleepMs(500); to skip this round cycle. -
Hi!
Yes, you are absolutely right. I fixed that in a trunk.
Best regards,
Victor
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login