<div>I&#39;m running select() and the listening port is returning that it&#39;s ready to add a new connection, but then it&#39;ll say it&#39;s ready even though there are no pending connections, thus blocking any interactions with current clients until someone else connects. I&#39;m copying over the read_set each time before select() is called (ala Beej) so I don&#39;t think it has to do with old data in the read_set.
</div>
<div>&nbsp;</div>
<div>Any ideas? I thought maybe accept() should have a timeout too (since select does), but ti doesn&#39;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&#39;s just a conceptual thing about accept() and why the listening port is saying that it&#39;s ready even though there&#39;s no pending conenctions.
</div>
<div>&nbsp;</div>
<div>I tried me server on sphere.cs (fyi).</div>
<div>I tried connecting to it using (functioning properly) http_client localhost &lt;listening port&gt;.</div>
<div>&nbsp;</div>
<div>When I sent data out from first client it doesn&#39;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&#39;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>&nbsp;</div>
<div>Thanks in advance,</div>
<div>Rick</div>