The first commit on this is the most important; my previous commit actually broke the 'reset-on-connect' function. This restores it properly.
As part of testing that I also set up a esp8266 server to allow testing of the ESP8266 (websocket) dependency;
This uncovered a race condition which crashes the server and is fixed by splitting the shared machineSocket object into explicit telnetSocket and espSocket objects.
reading the changelogs of WS showed no issues with upgrading all the way to the latest release, 8.x, the client part of the code is not much affected and no code changes are required.
After reading the changelogs, I explicitly set the protocolversion to 13 and specify string instead of binary data since I'm not sure these will always be the default.
Testing the above I uncovered a bug where malformed JSON data in firmeware status responses will crash the server, so the server now catches parser errors instead of exiting.
Finally, a couple of dev dependencies were in the package.json file but totally unused otherwise. I removed them.
The first commit on this is the most important; my previous commit actually broke the 'reset-on-connect' function. This restores it properly.
As part of testing that I also set up a esp8266 server to allow testing of the ESP8266 (websocket) dependency;
machineSocket
object into explicittelnetSocket
andespSocket
objects.Testing the above I uncovered a bug where malformed JSON data in firmeware status responses will crash the server, so the server now catches parser errors instead of exiting.
Finally, a couple of dev dependencies were in the package.json file but totally unused otherwise. I removed them.