<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Is it a bug?]]></title><description><![CDATA[<p dir="auto">hi,victor<br />
    netxms 1.1.6   in /src/server/core/Client.cpp::ClientListener()</p>
<pre><code>while(!IsShutdownInProgress())
   {
      iSize = sizeof(struct sockaddr_in);
      if ((sockClient = accept(sock, (struct sockaddr *)&amp;servAddr, &amp;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 &gt; 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 *)&amp;servAddr);
      if (!RegisterSession(pSession))
      {
         delete pSession;
      }
      else
      {
         pSession-&gt;run();
      }
</code></pre>
<p dir="auto">when accept error, The sockClient is -1, Then ThreadSleepMs(500);  but it will continue to create ClientSession with the wrong sockClient .<br />
Don't it we should insert " continue; " after ThreadSleepMs(500); to skip this round cycle.</p>
]]></description><link>https://forum.netxms.org/topic/1773/is-it-a-bug</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 10:24:04 GMT</lastBuildDate><atom:link href="https://forum.netxms.org/topic/1773.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 15 Jun 2012 03:03:52 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is it a bug? on Fri, 15 Jun 2012 09:25:09 GMT]]></title><description><![CDATA[<p dir="auto">Hi!</p>
<p dir="auto">Yes, you are absolutely right. I fixed that in a trunk.</p>
<p dir="auto">Best regards,<br />
Victor</p>
]]></description><link>https://forum.netxms.org/post/7658</link><guid isPermaLink="true">https://forum.netxms.org/post/7658</guid><dc:creator><![CDATA[victor]]></dc:creator><pubDate>Fri, 15 Jun 2012 09:25:09 GMT</pubDate></item></channel></rss>