To be fair, you only gave me 11 hours to answer :)
Looks like this was a bug - pipes only closed when the destination closed, rather than the source. I've fixed it in GitHub now, however it's obviously pretty easy to work around by closing the file in the close hander.
Also, if you check E.getErrorFlags() I bet it'll tell you ["BUFFER_FULL"]. It's because the HTTP client was grabbing data as fast as it could, but the pipe was only dealing with it in 32 byte chunks. I've fixed this now, but if you want to get it working with the current version I think you could change chunkSize to 512.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
To be fair, you only gave me 11 hours to answer :)
Looks like this was a bug - pipes only closed when the destination closed, rather than the source. I've fixed it in GitHub now, however it's obviously pretty easy to work around by closing the file in the
close
hander.Also, if you check
E.getErrorFlags()
I bet it'll tell you["BUFFER_FULL"]
. It's because the HTTP client was grabbing data as fast as it could, but the pipe was only dealing with it in 32 byte chunks. I've fixed this now, but if you want to get it working with the current version I think you could change chunkSize to 512.