Skip to content

Instantly share code, notes, and snippets.

/test2.js Secret

Created October 16, 2013 16:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/25a215c9ae9df68d754c to your computer and use it in GitHub Desktop.
Save anonymous/25a215c9ae9df68d754c to your computer and use it in GitHub Desktop.
var Domain = require('domain').Domain;
var assert = require('assert');
var dns = require('dns');
var dom = new Domain();
dom.run(function() {
dns.resolve4('www.google.com', function(err, result) {
assert(process.domain === dom);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment