Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
acidbubbles opened this issue May 12, 2024 · 1 comment

Comments

@acidbubbles
Copy link

acidbubbles commented May 12, 2024

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.

@dvonthenen
Copy link
Contributor

Hi @acidbubbles

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants