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

fix onclose event when client closes the connection #360

Merged
merged 2 commits into from
May 24, 2022
Merged

fix onclose event when client closes the connection #360

merged 2 commits into from
May 24, 2022

Conversation

regseb
Copy link
Contributor

@regseb regseb commented May 6, 2022

Fix #298

@@ -13,12 +13,19 @@ export function closeWebSocketConnection(context, code, reason) {
code,
reason
});
const serverCloseEvent = createCloseEvent({
type: 'server::close',
target: context.target,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the server the target should be the context - the proxy of the client

src/algorithms/close.js Show resolved Hide resolved
@regseb
Copy link
Contributor Author

regseb commented May 24, 2022

@Atrue I have fixed your feedback.

@Atrue Atrue merged commit caba3e0 into thoov:master May 24, 2022
@regseb regseb deleted the onclose branch May 24, 2022 16:02
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.

close listener of the socket isn't called when client close
2 participants