Ensure BAD domain example actually uses domain #5171

Closed
wants to merge 1 commit into
from
Jump to file
+5 −3
Split
View
@@ -48,9 +48,11 @@ d.on('error', function(er) {
// This is no better than process.on('uncaughtException')!
console.log('error, but oh well', er.message);
});
-require('http').createServer(function(req, res) {
- handleRequest(req, res);
-}).listen(PORT);
+d.run(function() {
+ require('http').createServer(function(req, res) {
+ handleRequest(req, res);
+ }).listen(PORT);
+});
```
By using the context of a domain, and the resilience of separating our