Menu

SocketServer poll problem?

Help
2001-03-05
2001-03-06
  • Stuart Woolford

    Stuart Woolford - 2001-03-05

    I've been having a problem with a SocketServer (very similar to the example) app under redhat 6.2 and 7.0, externally it seems that a new connection after the last connection has terminated does not connect, but the next one does.
    ie: a first telnet to the served port works (data transfers), and more do until the first (and all others..) have disconnected, then the next connect appears to work, but no data transfer, then the next one works until we drop to zero connections again.
    This looks to be a problem with poll being called for zero sockets, and it does not return until the *second* connection attempt is made.
    I'm chasing this, but was wondering if anyone had any hints.
    Regards,
    Stuart.

     
    • Stuart Woolford

      Stuart Woolford - 2001-03-06

      I've implemented a quick 'hack' fix which currently works (but is VERY ugly..) for 1.3.2

      in posix/poll.cpp, around line 511, where it reads:
      poll( mfd.getList(), count + 1, timer );
      I change it to:
      if(first)
           poll( mfd.getList(), count + 1, timer );
      else
           sleep(1);
      and this at least gets things going (in my app I can live with a max 1second connect delay for the rare problem case.. others may not be able to).
      now, I'm sure someone knows a real fix, anyone out there?

      Stuart.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.