eBot-CSGO
eBot-CSGO copied to clipboard
Fix websocket crashs. Catching Invalid JSON Parsed messages
Hello! Thank's a lot for your tool dude! I'v just find an uncatched error that cause a lot of websocket crashs. Here is the stack (websocket.error logs, i have it maybe 50 times):
SyntaxError: Unexpected token �
at Object.parse (native)
at Socket.
Sometime the function udpServer.on try to parse an unexpected char to json (accent char ?). This result to an uncatched SyntaxError.
Just brace and protect this case seem to avoid every websocket crash for me.