-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
refactor(@nestjs/websocket) ws support for connection req #821
Conversation
I wonder why |
update to master
return (client, req) => { | ||
// here different websocket implements may have different args | ||
// `ws` will have two args applied to this callback | ||
connection.next({ client, req }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we don't know the specific list of arguments, maybe we should pass all of them (using rest operator) instead of 2 selected ones
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right, I will try to fix.
add a second arg of `handleConnection` to support (client, req) => {} callback of the `connection` event
I try to change the code using |
update to nestjs/nest/master
add a second arg of `handleConnection` to support (client, req) => {} callback of the `connection` event
…to 813-ws-req-on-connection-fix
Any updates here? cc @tannineo |
See #813 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
add a second arg of
handleConnection
to support (client, req) => {} callback of theconnection
eventPR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Current
handleConnection
of the websocket gateway just apply 1 argclient
, which depends on different websocket implements. Forsocket.io
there is onlyclient
, but forws
, there're 2 args of theconnection
event:client
,req
.Issue Number: 813
What is the new behavior?
handleConnection
now accept 2 args.Does this PR introduce a breaking change?
Other information