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

Need to reload instead of reconnect when auth is failed #187

Merged
merged 1 commit into from
May 24, 2019

Conversation

shohey1226
Copy link
Contributor

When ttyd is restarted with different user:pass credential, like one time pass, there is a situation where client keep reconnecting but failing due to wrong user:pass. From the console.log, ttyd responds back with Websocket connection closed with code: 1008. I checked libwebsockets error code and it's POLICY_VIOLATION. It might be better if ttyd handles auth failure but this simple reload solves the situation.

image

https://github.com/warmcat/libwebsockets/blob/6fc66b001bba796382cafecc108593890b10735c/include/libwebsockets/lws-ws-close.h#L72

@tsl0922 tsl0922 merged commit b525417 into tsl0922:master May 24, 2019
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

Successfully merging this pull request may close these issues.

None yet

2 participants