So there's no difference at all? I'd expected that the server might go offline, but now would recover after 2 seconds?
Also, I imagine the 60 second timeout in httpGetAsync won't be helping matters for recovery? It'd be better to set that to 2 seconds as well.
If your webpage is actually just creating loads of connections and not closing them, I'm not sure what can be done. It's like you're making you own mini denial of service attack on the Espruino board.
Maybe the server can respond with a Connection:close header - not sure if that helps? As Espruino seems ok, you could just reset the ESP8266 if that was easier... a disconnect from the wifi and reconnect a second later should do it.
How often are you expecting to be polling from each webpage that views the Espruino Wifi? If it's more than every few seconds them IMO you should really be using WebSockets - which will keep one connection open and allow you to update as many times as you want.
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.
So there's no difference at all? I'd expected that the server might go offline, but now would recover after 2 seconds?
Also, I imagine the 60 second timeout in
httpGetAsync
won't be helping matters for recovery? It'd be better to set that to 2 seconds as well.If your webpage is actually just creating loads of connections and not closing them, I'm not sure what can be done. It's like you're making you own mini denial of service attack on the Espruino board.
Maybe the server can respond with a
Connection:close
header - not sure if that helps? As Espruino seems ok, you could just reset the ESP8266 if that was easier... a disconnect from the wifi and reconnect a second later should do it.How often are you expecting to be polling from each webpage that views the Espruino Wifi? If it's more than every few seconds them IMO you should really be using WebSockets - which will keep one connection open and allow you to update as many times as you want.