indexzero/daemon.node — Issue #13: http.get no longer works after daemon.start()
Author: mirqry
Created: 2012-02-11 23:14:21+00:00
State: open

I have been using the node v0.4.X branch in production along with daemon.node. I recently tried to upgrade to v0.6.10 and noticed that my application would run but didn't appear to be doing anything. After digging in, I narrowed it down to http.get() specifically. After get() was called none of the callbacks are ever called. I reduced it down to a pretty straight forward example:

```javascript
var daemon = require('daemon');
var fs = require('fs');
var http = require('http');
fs.open('test.log', 'w+', function (err, fd) {
daemon.start(fd);
var options = {
host: 'www.google.com',
port: 80,
path: '/index.html'
};
console.log('Making request');
http.get(options, function(res) {
console.log('Got response: ' + res.statusCode);
}).on('error', function(e) {
console.log('Got error: ' + e.message);
});
});
```

When this code is run, "Making request" is written to test.log, but
neither the callback or the error event are ever called. The
application will continue to run forever though and has to be killed
manually.

I am testing on CentOS 5.3