Permalink
Browse files

Ensure BAD domain example actually uses domain

  • Loading branch information...
1 parent e5b90a1 commit 440dcae98744954d1528506f2648aff71aadde25 @mhart mhart committed with isaacs Mar 30, 2013
Showing with 5 additions and 3 deletions.
  1. +5 −3 doc/api/domain.markdown
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

0 comments on commit 440dcae

Please sign in to comment.