• Hmm... I just got it to happen - not sure why it didn't before.

    I added the following code:

          console.log("Before",getTime());
          agent[message.content.method].call(agent,message.content.params,callback);
          //agent[message.content.method] (message.content.params,callback);
          console.log("After",getTime());
    

    and I get results like this:

    Before 742.24305057525634765625
    fireing callback
    I have the answer ( 0 ) 83 0 6fo1civxub28
    After 0
    

    But only with .call - not with the normal function call.

    It sounds like it's a bug in Espruino somewhere then - possibly caused by nested .apply/call as you say - as I just tried a test case with a single call and couldn't reproduce it. If you could try and come up with an example that would be a huge help...

About

Avatar for Gordon @Gordon started