Merhaba Biz node.js, socket.io ve redis'te uygulama geliştiriyoruz.node.js içinde cleartimeout nasıl yapılır
bu prosedür var:
exports.processRequest = function (request,result) {
var self = this;
var timerknock;
switch(request._command) {
case 'some command': // user login with username
// some statement
timerknock=setTimeout(function() {
//some statemetn
},20*1000);
case 'other command ':
// some statement
clearTimeout(timerknock);
}
};
ancak diğer komuta çalıştırıldığında iptal almıyor zamanlayıcı i zamanlayıcıyı iptal etmek ne yapmalıyız iptal zaman?