-
Notifications
You must be signed in to change notification settings - Fork 195
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
got TypeError when reusing spdy-client #232
Comments
@dy93 may I ask you to run this script with Thank you! |
@indutny I make some change to the testing code to make it clear, Thanks! |
@dy93 sorry for quite a big delay. I have bad news for you, this is not node-spdy bug (at seems it doesn't look like it). It looks like this is a V8 bug instead, if you will run I'm still checking it just to be sure, but all evidence that I have so far leads to this conclusion. I will work on resolving V8 issue, but it will probably take more time. Sorry! |
@dy93 btw, it is very likely that the promises are the cause of the problem here. So if you could do what you want without them - I would recommend giving it a try. |
@dy93 filed v8 bug: https://code.google.com/p/v8/issues/detail?id=4582&thanks=4582&ts=1448847246 Please star it ;) |
@indutny I think it is not a bug related to promise, because I got same error when I continuously make requests 3 times using spdy agent. here is my sample code that does not use promise: btw, I think you're right, it may be a bug related to v8 |
I think this might be related to the issue that I just reported. #252. The spdy module depends on the parser object from the ServerResponse object (part of the node http module). However, after res.end() is called the parser is disposed in some fashion, leaving it in an unusable state. I think (after a few minutes digging around in the node lib source) that the parser is native module or part of V8. So this behavior makes sense (the GC can't clean it up). I suspect, the solution is not to borrow the parser from the response, but for this module to create it's own instances of the parser who's life cycle can be controlled independently. |
I'm trying to reuse spdy-client to do multiple request to same host,
here is my sample code:
above code got following error:
when I put two task() in Promise.all(), it works fine.
but when I put more than three task() into it, I got the error.
please tell me how to reuse a spdyAgent.
my node version is v4.2.2,
and my node-spdy version is 2.1.0
Thanks
The text was updated successfully, but these errors were encountered: