Answer the question
In order to leave comments, you need to log in
Why is there a double function call?
Good afternoon,
There is a given call to a method on the server
Meteor.call('ActionOn',{
deck:game.chosenCardId.deck,
index:game.chosenCardId.index
},{
deck:model.deck,
index:model.index
},state.type,false,function(error,result)
{
if(!error)
{
if(result)
{
log.push(result);
if(result == "Success")
{
log.push("Model successfully action");
}
}
else
{
log.push("Status of shooting unknown");
}
}
else if(error.error == "battle_exist_error")
{
log.push("ID check unsuccesfull");
}
else if(error.error == 'order_error')
{
log.push("This model can't turning now, because another have priority");
}
else if(error.error == 'immovable')
{
log.push("Model is immovable");
}
else if(error.error == 'type_unidentified')
{
log.push("This type of action isn't supported");
}
else
{
log.push("Unidentified error rise from server");
}
_logDep.changed();
_turnDep.changed();
});
Answer the question
In order to leave comments, you need to log in
By default, Meteor.call after 30 seconds, if there is a callback, without receiving a response from the server, makes a second call with the same set of parameters.
The reason for this delay is not important, even if it is caused by debugging on the server side through the IDE.
It is cured by using Meteor.apply (), in which you can specify the noRetry parameter, which will prevent this behavior.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question