Hook.js load websocket.js only if specifield in beef configuration file

if websocket is disabled all work normally
 if websocket is enabled have trouble in command.rb
This commit is contained in:
Graziano Felline
2012-04-12 19:01:49 +02:00
parent af9b3c97b5
commit 23f782b8d8
10 changed files with 105 additions and 97 deletions

View File

@@ -51,14 +51,14 @@ beef.updater = {
beef.net.flush();
if(beef.commands.length > 0) {
this.execute_commands();
} /*here controllare ci sta sto websocket??? nn ha senso fare polling*/
}
else {
this.get_commands(); /*Polling*/
}
}
/*@Todo Simple ceck to stop polling */
if (beef.websocket.socket == null)
//if ( typeof beef.websocket === "undefined")
setTimeout("beef.updater.check();", beef.updater.timeout);
},