deepgram-dotnet-sdk icon indicating copy to clipboard operation
deepgram-dotnet-sdk copied to clipboard

LiveClient.IsConnection() throws NullReferenceException when called without websocket client instance.

Open acidbubbles opened this issue 1 year ago • 1 comments
trafficstars

What is the current behavior?

NullReferenceException

Steps to reproduce

var live = new LiveClient();
var _ = live.IsConnected(); // This throws because _clientWebSocket can be null

Expected behavior

false

Please tell us about your environment

Not related

Other information

I would recommend you enable <Nullable>enable</Nullable> on the project, this one would have been easily detected :)

Also, I can receive that same error after calling Connect. Probably because of KeepAlive but I didn't investigate more.

acidbubbles avatar May 12 '24 02:05 acidbubbles

Hi @acidbubbles

Nice catch. Will fix this when I get back to .NET.

davidvonthenen avatar May 13 '24 14:05 davidvonthenen

Will be available in the 4.1 release.

davidvonthenen avatar Jul 02 '24 20:07 davidvonthenen