<div>I'm running select() and the listening port is returning that it's ready to add a new connection, but then it'll say it's ready even though there are no pending connections, thus blocking any interactions with current clients until someone else connects. I'm copying over the read_set each time before select() is called (ala Beej) so I don't think it has to do with old data in the read_set.
</div>
<div> </div>
<div>Any ideas? I thought maybe accept() should have a timeout too (since select does), but ti doesn't seem to be working that way...</div>
<div>Accept works, and if I connect another client, it then is able to process the previous clients request/respond to it. So I know the code is fine it's just a conceptual thing about accept() and why the listening port is saying that it's ready even though there's no pending conenctions.
</div>
<div> </div>
<div>I tried me server on sphere.cs (fyi).</div>
<div>I tried connecting to it using (functioning properly) http_client localhost <listening port>.</div>
<div> </div>
<div>When I sent data out from first client it doesn't reply (even thoughit was sent w no errors).</div>
<div>Server is hung on accept()</div>
<div>I connect another client (new ssh).</div>
<div>Server gets new connection.</div>
<div>Server handles first client's request, and sends a reply.</div>
<div>server thinks the listening port is ready again so it accept() blocks.</div>
<div>Have to make a new connection.</div>
<div>Server gets connection.</div>
<div>...</div>
<div>...</div>
<div>...</div>
<div> </div>
<div>Thanks in advance,</div>
<div>Rick</div>