You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • There is no need to free memory or 'clean up the internals of Espruino', because if the socket times out then it's a socket error, which should be reported by sending -1 from the ESP8266 drivers, and Espruino will then see the error and automatically free everything.

    It only doesn't do that right now because the ESP8266 port is broken. When it is fixed the problem will go away.

    Look at it this way: Right now, if Espruino gets an error reported on the socket it frees everything automatically. Sure, it doesn't report the error to your code, but everything gets freed. It's broken right now because it's not getting told there's a socket error.

    So suppose I spend time and add this error reporting code you want? It won't work on ESP8266 right now because ESP8266 isn't reporting the error back to Espruino.

    There's absolutely no point me doing it until the ESP8266 port is working as it should... but then when it's working nobody will have this problem any more and the urgency will go away.

About

Avatar for Gordon @Gordon started