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

forever-agent does not work with Node 0.12 #1472

Closed
akshayp opened this issue Mar 10, 2015 · 2 comments · Fixed by #1486
Closed

forever-agent does not work with Node 0.12 #1472

akshayp opened this issue Mar 10, 2015 · 2 comments · Fixed by #1486

Comments

@akshayp
Copy link
Contributor

akshayp commented Mar 10, 2015

Moving #1421 (comment) since this technically doesn't block request from working unless the forever option is enabled

I'm using the forever option with request. Starting 0.12 this option leads to ENOTSOCK and ECONNRESET errors. This never works presumably because the HTTP Agent API changed quite a bit with node 0.12. eg:

var request = require('./index').forever({maxSockets: 1});
request('http://www.yahoo.com', function (error, response, body) {
    if (error) {
        console.log(error);
    } else {
        console.log(response.statusCode);
    }
});

leads to

{ [Error: connect ENOTSOCK] code: 'ENOTSOCK', errno: 'ENOTSOCK', syscall: 'connect' }

vs on node 0.10 it logs

200
@nickmccurdy
Copy link
Contributor

It seems like it would help to write a regression test for this.

@akshayp
Copy link
Contributor Author

akshayp commented Mar 15, 2015

@nicolasmccurdy Added a test in the linked PR

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 a pull request may close this issue.

2 participants