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

Remove the upgradeReq property #1104

Merged
merged 1 commit into from
May 11, 2017
Merged

Remove the upgradeReq property #1104

merged 1 commit into from
May 11, 2017

Conversation

lpinca
Copy link
Member

@lpinca lpinca commented May 11, 2017

This removes the upgradeReq property from the WebSocket object. The http.IncomingMessage object is instead passed as the second argument to the connection event.

In this way most of the memory retained by the http.IncomingMessage object can be GC'ed reducing memory usage by ~20%.

Developers can save only the required info or the whole http.IncomingMessage object, if they have to, when the event is emitted.

See discussion in #1099.

The `http.IncomingMessage` object, instead of being attached to the
`WebSocket` object, is passes as the second argument to the
`connection` event.
@lpinca lpinca merged commit 33e58ae into breaking-changes May 11, 2017
@lpinca lpinca deleted the remove/upgrade-req branch May 11, 2017 12:43
lpinca added a commit that referenced this pull request May 16, 2017
The `http.IncomingMessage` object, instead of being attached to the
`WebSocket` object, is passes as the second argument to the
`connection` event.
lpinca added a commit that referenced this pull request May 16, 2017
The `http.IncomingMessage` object, instead of being attached to the
`WebSocket` object, is passes as the second argument to the
`connection` event.
lpinca added a commit that referenced this pull request May 17, 2017
The `http.IncomingMessage` object, instead of being attached to the
`WebSocket` object, is passes as the second argument to the
`connection` event.
roperzh added a commit to HaikuTeam/animator that referenced this pull request Sep 23, 2017
In 61fa5ba the `ws` package got upgraded to v3, which comes with
a breaking change to the `connect` API. This updates our consumers
to the new API, fixing a crash when initializing the app.

More details on `ws` v3 breaking changes [here]
(websockets/ws#1104)
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.

2 participants