Hey,
I've been looking at the compiled source code for the dotnet client, and there are some potential pitfalls in async calls not beeing awaited, like the websocket connection is created through System.Net.WebSockets.ClientWebSocket and that is connecting to the lightstreamer server with a call to ConnectAsync method.
But the lightstreamer library is making that call inside a constructor which as not async and bad practice it would be more reasonable to be used like this:
var ws = new WebSocket();
await ws.ConnectAsync();
See ref:
https://github.com/Lightstreamer/Lightstreamer-lib-client-haxe/blob/main/src/platform/cs/com/lightstreamer/internal/WsClient.hx#L38C10-L38C22
Hey,
I've been looking at the compiled source code for the dotnet client, and there are some potential pitfalls in async calls not beeing awaited, like the websocket connection is created through
System.Net.WebSockets.ClientWebSocketand that is connecting to the lightstreamer server with a call to ConnectAsync method.But the lightstreamer library is making that call inside a constructor which as not async and bad practice it would be more reasonable to be used like this:
See ref:
https://github.com/Lightstreamer/Lightstreamer-lib-client-haxe/blob/main/src/platform/cs/com/lightstreamer/internal/WsClient.hx#L38C10-L38C22