Yes this is as well part of the problem. My close handlers are not getting called if the line starts with \r\n or \r or \n. See here:
var handler = function(d) { var s; if(d === 'OK') { s = sckt; at.registerLine(s + ', CONNECT OK', function() { at.unregister(s + ', CONNECT OK'); socks[s] = true; }); at.registerLine(s + ', CLOSED', function() { at.unregisterLine(s + ', CLOSED'); socks[s] = undefined; }); } }; at.cmd('AT+CIPSTART='+sckt+',"TCP",'+JSON.stringify(host)+','+port+'\r\n', 10000, handler);
This unfortunately happens sometimes, for example a few seconds ago I had the situation:
] "\r\n1, CLOSED\r\n" <--- "\r\n1, CLOSED\r\n"
The close handler has not been called here :(
@net-tobi started
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.
Yes this is as well part of the problem. My close handlers are not getting called if the line starts with \r\n or \r or \n. See here:
This unfortunately happens sometimes, for example a few seconds ago I had the situation:
The close handler has not been called here :(