Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. Is it a bug?

Is it a bug?

Scheduled Pinned Locked Moved Support
2 Posts 2 Posters 19.1k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 1
    1
    165432896
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi!

      Yes, you are absolutely right. I fixed that in a trunk.

      Best regards,
      Victor

      1 Reply Last reply
      0

      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
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      Powered by NodeBB Contributors
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups