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

server websockets fails when the application is closed. #69

Open
mahsashadi opened this issue Sep 26, 2022 · 1 comment
Open

server websockets fails when the application is closed. #69

mahsashadi opened this issue Sep 26, 2022 · 1 comment

Comments

@mahsashadi
Copy link
Contributor

Hi.
In server-side of my application I am tailing a log file and sending logs via ws messages to client.
When I unexpectedly close the application, It faces an error:

Error: WebSocket is not open: readyState 3 (CLOSED)

How can I make server not to send its ws messages when the app is closed?

@andersevenrud
Copy link
Member

You can probably use ws.readyState to see if the socket is open or not.

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