Skip to content

[fix] Prevent "Cannot read property 'headers' of null" #767

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

Merged
merged 1 commit into from
Dec 13, 2020

Conversation

mariocasciaro
Copy link
Contributor

@mariocasciaro mariocasciaro commented Dec 1, 2020

Apparently there is an unidentified bug in SockJS whereby the connection object received in the 'connection' event handler is sometimes null. This has started to happen to us when we upgraded to Node v14 (from v10) and it has happened in production a few times already causing the entire server to collapse.
Please see sockjs/sockjs-node#121 and also webpack/webpack-dev-server@7964997 where webpack-dev-server implements a similar fix.

Apparently there is an unidentified bug in SocketJS whereby the connection object received in the 'connection' event handler is sometimes null. This has started to happen to us when we upgraded to Node v14 (from v10) and it has happened in production a few times already causing the entire server to collapse.
Please see sockjs/sockjs-node#121 and also webpack/webpack-dev-server@7964997 where webpack-dev-server implements a similar fix.
@lpinca
Copy link
Member

lpinca commented Dec 4, 2020

Is there a way to reproduce this? It would be nice to have the bug fixed upstream.

@lpinca
Copy link
Member

lpinca commented Dec 4, 2020

cc: @brycekahle

@mariocasciaro
Copy link
Contributor Author

mariocasciaro commented Dec 4, 2020 via email

@lpinca lpinca merged commit 0db55b7 into primus:master Dec 13, 2020
@lpinca
Copy link
Member

lpinca commented Dec 13, 2020

Thank you.

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