Permalink
Browse files

Various fixes to the examples.

  • Loading branch information...
1 parent 693d5ee commit 4df6e4959afdbe437e5cf79386740fb90029be9a @ericflo committed Nov 27, 2009
Showing with 2 additions and 6 deletions.
  1. +1 −1 examples/client.js
  2. +1 −5 examples/server.js
View
@@ -28,6 +28,6 @@ client.call('delayed.add', [1, 1, 1000], function(result) {
sys.puts(result);
});
-client.call('delayed.multiply', [5, 5, 500], function(result) {
+client.call('delayed.echo', ['Echo.', 500], function(result) {
sys.puts(result);
});*/
View
@@ -36,7 +36,6 @@ Once this is fixed, or I figure out where I went wrong, I'll be able to
uncomment this code.
=====================================================================================
-
var delayed = {
echo: function(data, delay) {
var promise = process.Promise();
@@ -48,13 +47,10 @@ var delayed = {
add: function(first, second, delay) {
var promise = process.Promise();
- if(1) {
- return first + second;
- }
setTimeout(function() {
promise.emitSuccess(first + second);
}, delay);
- return promise;
+ return first + second;
}
}

0 comments on commit 4df6e49

Please sign in to comment.