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

write after end #8

Open
laggingreflex opened this issue Jun 13, 2015 · 1 comment
Open

write after end #8

laggingreflex opened this issue Jun 13, 2015 · 1 comment

Comments

@laggingreflex
Copy link

Getting this error

Error: write after end
   at ClientRequest.OutgoingMessage.write (_http_outgoing.js:413:15)
   at IncomingMessage.ondata (_stream_readable.js:540:20)
   at IncomingMessage.emit (events.js:107:17)
   at C:\...\node_modules\connect-restreamer\index.js:18:13
   at process._tickCallback (node.js:355:11)

Using this simple code: gist. Getting the error only on POST requests, probably when something with body parsing is involved.

@leejefon
Copy link

leejefon commented Jul 9, 2015

In the index.js, the call next() is before process.nextTick()
I moved it to after process.nextTick() and it worked
The problem with this solution is that you are directly modifying the required module, but I guess since the code is not a lot, it should be easy

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

2 participants