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

If image responds after timeout then the node process crashes #9

Closed
struan opened this issue Jan 12, 2015 · 2 comments
Closed

If image responds after timeout then the node process crashes #9

struan opened this issue Jan 12, 2015 · 2 comments

Comments

@struan
Copy link
Contributor

struan commented Jan 12, 2015

The server falls over with a stack trace:

http.js:689
    throw new Error('Can\'t set headers after they are sent.');
    ^
Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (http.js:689:11)
    at ServerResponse.res.setHeader (/app-path/node_modules/express/node_modules/connect/lib/patch.js:133:22)
    at ServerResponse.setWriteHeadHeaders (/app-path/node_modules/express/node_modules/connect/node_modules/on-headers/index.js:80:19)
    at ServerResponse.writeHead (/app-path/node_modules/express/node_modules/connect/node_modules/on-headers/index.js:39:36)
    at gm.<anonymous> (/app-path/node_modules/image-proxy/lib/image-proxy.js:69:19)
    at cb (/app-path/node_modules/image-proxy/node_modules/gm/lib/command.js:265:16)
    at gm._spawn (/app-path/node_modules/image-proxy/node_modules/gm/lib/command.js:253:7)
    at /app-path/node_modules/image-proxy/node_modules/gm/lib/command.js:117:19
    at series (/app-path/node_modules/image-proxy/node_modules/gm/node_modules/array-series/index.js:11:36)
    at gm._preprocess (/app-path/node_modules/image-proxy/node_modules/gm/lib/command.js:154:5)

And pointing the proxy at the image served by this example node app should replicate the error:

https://gist.github.com/chrismytton/5f0ac2fd54e0d3872f0a

@jpmckinney
Copy link
Owner

Thanks for reporting! Fixed.

@struan
Copy link
Contributor Author

struan commented Jan 12, 2015

Thanks for the quick fix :)

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