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

Close WS Connection gracefully #6

Closed
MerzMax opened this issue Nov 6, 2021 · 3 comments · Fixed by #7
Closed

Close WS Connection gracefully #6

MerzMax opened this issue Nov 6, 2021 · 3 comments · Fixed by #7
Assignees
Labels
client The issue is realted to the client enhancement New feature or request

Comments

@MerzMax
Copy link
Owner

MerzMax commented Nov 6, 2021

In order to decide if the disconnect of an client was intended or not, the intendet disconnect should be "quiet". At the moment the connection will not be closed gracefully.

If the client programm will be terminated the following output will be displayed in the server:

2021/11/05 18:41:10 Error during reading message:  websocket: close 1006 (abnormal closure): unexpected EOF
@MerzMax MerzMax self-assigned this Nov 6, 2021
@MerzMax
Copy link
Owner Author

MerzMax commented Nov 6, 2021

@martbock The server now logs:

2021/11/06 15:25:57 Error during reading message:  websocket: close 1000 (normal)

Do you think thats fine or should we digg deeper into this?

Additional client logs:

2021/11/06 15:25:57 Error while receiving message: websocket: close 1000 (normal)
2021/11/06 15:25:57 Error while sending message: websocket: close sent

@MerzMax MerzMax added client The issue is realted to the client enhancement New feature or request labels Nov 6, 2021
@martbock
Copy link
Collaborator

martbock commented Nov 8, 2021

Do you think thats fine or should we digg deeper into this?

Am I correct in assuming the PR already digs deeper into it? If not, I guess we should look into it – but we could create a separate issue and fix it later on.

@MerzMax
Copy link
Owner Author

MerzMax commented Nov 8, 2021

@martbock no the PR does not digg deeper yet. If you compare the log statements the output changes from an unexpected to an expected error. The question is as if this is fine or if we should handle this differently.

Maybe we should discuss how to manage errors in general on thursday :)

MerzMax added a commit that referenced this issue Nov 11, 2021
@MerzMax MerzMax mentioned this issue Nov 26, 2021
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client The issue is realted to the client enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants