Created
January 29, 2010 03:27
-
-
Save keturn/289409 to your computer and use it in GitHub Desktop.
expression-crash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* This was one of my attempts to figure out deferred responses. | |
It crashes the whole server with a message like this: | |
[object Object].emitSuccess (node.js:283:15) | |
[object Object].<anonymous> (node.js:695:21) | |
[object Object].emitSuccess (node.js:283:15) | |
node.js:552:29 | |
node.js:1027:1 | |
node.js:1031:1 | |
*/ | |
require.paths.unshift('lib'); | |
require('express'); | |
var posix = require('posix'); | |
get('/', function () { | |
var myRequest = this; | |
function up(s) { | |
myRequest.respond(s.toUpperCase()); | |
} | |
return posix.cat('/etc/motd').addCallback(up); | |
}); | |
run(3001); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment