Issue with menu and performNoneCommand is that the menu which is reading from command line and issuing unsubscribe reads from the same web socket connection while still in the performNonecommand loop, this one consumes the intended read response which lets us hanging in
Which then is treated as command number, although handled it is a bit strange to instruct to use q and then issue an error message that this command is not supported. Suggestion to detect q and just roll with it ?
In some cases when we don't get stuck the server returns a web socket error:
Response error: websocket: RSV2 set, RSV3 set, bad opcode 4
Further more, forcefully killing an ongoing subscription such as menu number 5:
{"action":"subscribe","filter":{"parameter":{"bufsize":"20","maxerr":"2"},"type":"curvelog"},"path":"Vehicle.Speed","requestId":"275"} ,
will put the server in endless error loop...
...
{"file":"serviceMgr.go:394","level":"info","msg":"deactivateSubscription: closeClSubId set to 1","time":"2024-04-25T10:57:28Z"}
vissv2server | {"file":"serviceMgr.go:1184","level":"info","msg":"internal-killsubscriptions: RouterId = 1?0","time":"2024-04-25T10:57:28Z"}
vissv2server | {"file":"serviceMgr.go:394","level":"info","msg":"deactivateSubscription: closeClSubId set to 1","time":"2024-04-25T10:57:28Z"}
vissv2server | {"file":"serviceMgr.go:1184","level":"info","msg":"internal-killsubscriptions: RouterId = 1?0","time":"2024-04-25T10:57:28Z"}
vissv2server | {"file":"serviceMgr.go:394","level":"info","msg":"deactivateSubscription: closeClSubId set to 1","time":"2024-04-25T10:57:28Z"}
...
Issue with menu and performNoneCommand is that the menu which is reading from command line and issuing unsubscribe reads from the same web socket connection while still in the performNonecommand loop, this one consumes the intended read response which lets us hanging in
However, the current code also writes the command q to the command number channel... we get
Which then is treated as command number, although handled it is a bit strange to instruct to use q and then issue an error message that this command is not supported. Suggestion to detect q and just roll with it ?
In some cases when we don't get stuck the server returns a web socket error:
Further more, forcefully killing an ongoing subscription such as menu number 5: {"action":"subscribe","filter":{"parameter":{"bufsize":"20","maxerr":"2"},"type":"curvelog"},"path":"Vehicle.Speed","requestId":"275"} , will put the server in endless error loop...