fix password not updating on server
This commit is contained in:
@@ -25,8 +25,6 @@ fplay.server = http.createServer(function(req, res){
|
||||
}
|
||||
});
|
||||
|
||||
fplay.wss = new WebSocketServer({ server: fplay.server, path: "/" + fplay.PASSWORD });
|
||||
|
||||
fplay.seqid = 0;
|
||||
fplay.pending = new Map(); // promise map
|
||||
fplay.pending_dom_ready = new Map();
|
||||
@@ -509,7 +507,17 @@ fplay.event.on("web_request", function(page){
|
||||
|
||||
fplay.browser_connected = false;
|
||||
|
||||
fplay.wss.on("connection", async function(ws){
|
||||
fplay.init = function(port = 3030, password = "cnc", command_timeout = 5000){
|
||||
|
||||
fplay.PORT = port;
|
||||
fplay.COMMAND_TIMEOUT = command_timeout;
|
||||
fplay.PASSWORD = password;
|
||||
|
||||
fplay.server.listen(fplay.PORT, function(){
|
||||
|
||||
fplay.wss = new WebSocketServer({ server: fplay.server, path: "/" + fplay.PASSWORD });
|
||||
|
||||
fplay.wss.on("connection", async function(ws){
|
||||
|
||||
fplay.browser_connected = true;
|
||||
fplay.event.emit("browser_connect", ws);
|
||||
@@ -544,15 +552,7 @@ fplay.wss.on("connection", async function(ws){
|
||||
fplay.browser_connected = false;
|
||||
fplay.event.emit("browser_disconnect", {});
|
||||
});
|
||||
});
|
||||
|
||||
fplay.init = function(port = 3030, password = "cnc", command_timeout = 5000){
|
||||
|
||||
fplay.PORT = port;
|
||||
fplay.COMMAND_TIMEOUT = command_timeout;
|
||||
fplay.PASSWORD = password;
|
||||
|
||||
fplay.server.listen(fplay.PORT, function(){
|
||||
});
|
||||
|
||||
fplay.event.emit("server_ready", {});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user