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

req.socket.destroy() is not a function #31

Closed
ErisDS opened this issue Feb 4, 2022 · 1 comment
Closed

req.socket.destroy() is not a function #31

ErisDS opened this issue Feb 4, 2022 · 1 comment

Comments

@ErisDS
Copy link
Collaborator

ErisDS commented Feb 4, 2022

Regularly when I cock things up slightly whilst working with reqresnext I get an error req.socket.destroy() is not a function coming from finalhandler here: https://github.com/pillarjs/finalhandler/blob/master/index.js#L128

I have moved past it many times as each time I see this, it's just masking another error in my code and don't have a proper recorded error + trace or a reproduction case right now.

@ErisDS
Copy link
Collaborator Author

ErisDS commented Mar 31, 2022

I'm gonna close this... I've tried to reproduce it by doing weird things in express apps and I cannot. I could just add a line to prevent it, but I'd rather do that after finding a legit reproduction case.

@ErisDS ErisDS closed this as completed Mar 31, 2022
ErisDS added a commit to TryGhost/framework that referenced this issue Mar 31, 2022
refs: antongolub/reqresnext#31

- Whilst building the test framework I kept hitting this weird error req.socket.destroy() is not a function
- I added a workaround of declaring it as a function, and that made me get more sensible errors, showing that there was some other issue at play
- I can no longer remember the causes nor reproduce the issue with the framework, so I'm removing this line
- It is untested and untestable... as I can't find the case!
- If anyone gets this error again, we'll create a repro case and fix the issue in reqresnext with tests
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

No branches or pull requests

1 participant