Hi all, I have a problem where a system of mine that retries HTTP requests
when they fail is leaking memory. Here's a simple demo:
```
var http = require('http');
var request = function() {
var req = http.request({
host: 'localhost',
port: 9000,
method: 'GET',
path: '/'
});
req.addListener('error', function() {
setTimeout(request, 1000);
});
req.end();
};
request();
```
This script (assuming you don't have anything listening on localhost:9000)
will leak memory. How do I stop this happening?
--
James Coglan
http://jcoglan.com
+44 (0) 7771512510
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.