Skip to content

WebSocket.lvclass:Close.vi does not close TCP refnum when an error is wired #16

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

Open
cordbm opened this issue May 9, 2025 · 1 comment

Comments

@cordbm
Copy link

cordbm commented May 9, 2025

Thanks for the library, I'm using it for providing a log webpage for systems on the network.
I wanted to handle the case when the handshake fails (e.g. if someone opens the endpoint in a browser). Then I noticed that I could still use the TCP refnum after calling Close.
This is unexpected as the general LabVIEW convention is to always close/destroy refnums even if an error is encountered.

The cause is that the error in terminal of the Socket accessor VI is wired and returns a default value in the error case.
The VI should look something like this:

Image

@cordbm
Copy link
Author

cordbm commented May 9, 2025

Thinking further, it should probably not send the close message if the handshake fails, but that's a different issue.

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

1 participant