Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@stagas
Created April 10, 2011 08:49
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 stagas/912162 to your computer and use it in GitHub Desktop.
Save stagas/912162 to your computer and use it in GitHub Desktop.
dnode date values bug
//
var dnode = require('dnode')
dnode({
bar: function(cb) {
cb({
foo: 'bar'
, date: new Date()
})
}
}).listen(6565)
process.nextTick(function() {
dnode.connect(6565, function(foo) {
setInterval(function() {
foo.bar(function(res) {
console.log(res)
})
}, 500)
})
})
TypeError: this is not a Date object.
at Date.valueOf (native)
at Date.toJSON (native)
at Object.stringify (native)
at EventEmitter.<anonymous> (/usr/local/lib/node/.npm/dnode/0.6.7/package/index.js:175:31)
at EventEmitter.emit (events.js:64:17)
at EventEmitter.request (/usr/local/lib/node/.npm/dnode-protocol/0.0.5/package/index.js:51:14)
at /usr/local/lib/node/.npm/dnode-protocol/0.0.5/package/index.js:80:26
at Object.bar (/root/node/Penny-Auction-Logger/lib/test-dnode.js:7:5)
at apply (/usr/local/lib/node/.npm/dnode-protocol/0.0.5/package/index.js:127:17)
at EventEmitter.handle (/usr/local/lib/node/.npm/dnode-protocol/0.0.5/package/index.js:104:13)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment