<div dir="ltr">On Mon, Oct 21, 2013 at 5:15 PM, Corey O'Connor <span dir="ltr"><<a href="mailto:coreyoconnor@gmail.com" target="_blank">coreyoconnor@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div style="font-family:'courier new',monospace">

Curiously: If the Network.HTTP.close is removed the server does not fail, but some requests takes several seconds to process. I presume the ordering of effects is then correct, but without the explicit close the close occurs only a GC time.<br>

</div>
</div></blockquote><div><br></div><div>The client may be trying to reuse the connection; see <a href="http://en.wikipedia.org/wiki/HTTP_persistent_connection" target="_blank">http://en.wikipedia.org/wiki/HTTP_persistent_connection</a>.  This seems consistent with your results:</div>


<div><br></div><div> * With the close call: connection is closed right after client sends a second request, so client whines.</div><div><br></div><div> * Without the close call: client waits around for a response, then gives up and establishes another connection.</div>


<div><br></div><div>To confirm, add another <span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre-wrap">receiveHTTP</span> call <span style="color:rgb(51,51,51);font-family:Consolas,'Liberation Mono',Courier,monospace;font-size:12px;line-height:18px;white-space:pre-wrap">client_interact and see if it returns another Request.</span></div>


</div></div></div>