-->
Page 1 of 1

HTTP Connection close doesn't clear the buffer

PostPosted: Sat Feb 28, 2015 10:44 am
by zooto68
If I make two connections and call them one after the other, closing the first one before opening the second, the second call loses returned data.

I made one call to the Wunderground API which returned a JSON string of about 587 chars. Did a conn:close() and then called a second JSON string (different address) which returned a JSON string of around 2641 chars.

The first payload is complete, the second payload is incomplete. Clearly the first connection is leaving data in the buffer. We need a way to clear the buffer inbetween connections for HTTP connections.