Isn't that just what I said in my last post? Maybe we were both writing it at the same time :)
Given Espruino's networking has been in use for some time now, and nobody has made a great fuss about this before, I'd be tempted to say that on('error' isn't vital.
The issue @hygy would seem to have is that the ESP8266 code isn't reporting back errors (which it can easily do by returning -1 in recv or send), and so the HTTP client is sitting there with allocated memory.
Once ESP8266 does that, @hygy's problem will go away - and we can look at on('error' later on - it would be a nice addition for sure.
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.
Isn't that just what I said in my last post? Maybe we were both writing it at the same time :)
Given Espruino's networking has been in use for some time now, and nobody has made a great fuss about this before, I'd be tempted to say that
on('error'
isn't vital.The issue @hygy would seem to have is that the ESP8266 code isn't reporting back errors (which it can easily do by returning
-1
inrecv
orsend
), and so the HTTP client is sitting there with allocated memory.Once ESP8266 does that, @hygy's problem will go away - and we can look at
on('error'
later on - it would be a nice addition for sure.