[BUGFIX] session_init before auth_status
This commit is contained in:
parent
b92c33b10e
commit
77278ca130
|
@ -62,7 +62,7 @@ func (n *Node) SSHUpdate(sshmgmt *ssh.Manager) bool {
|
||||||
uci set wireless.%s.txpower='%d';
|
uci set wireless.%s.txpower='%d';
|
||||||
uci commit wireless;`,
|
uci commit wireless;`,
|
||||||
radio, n.Wireless.TxPower24))
|
radio, n.Wireless.TxPower24))
|
||||||
runWifi = true
|
//runWifi = true
|
||||||
}
|
}
|
||||||
if n.Wireless.Channel24 != n.WirelessRespondd.Channel24 {
|
if n.Wireless.Channel24 != n.WirelessRespondd.Channel24 {
|
||||||
//ubus call hostapd.%s switch_chan '{"freq":%d}'
|
//ubus call hostapd.%s switch_chan '{"freq":%d}'
|
||||||
|
@ -92,7 +92,7 @@ func (n *Node) SSHUpdate(sshmgmt *ssh.Manager) bool {
|
||||||
uci set wireless.%s.txpower='%d';
|
uci set wireless.%s.txpower='%d';
|
||||||
uci commit wireless;`,
|
uci commit wireless;`,
|
||||||
radio, n.Wireless.TxPower5))
|
radio, n.Wireless.TxPower5))
|
||||||
runWifi = true
|
//runWifi = true
|
||||||
}
|
}
|
||||||
if n.Wireless.Channel5 != n.WirelessRespondd.Channel5 {
|
if n.Wireless.Channel5 != n.WirelessRespondd.Channel5 {
|
||||||
//ubus call hostapd.%s switch_chan '{"freq":%d}'
|
//ubus call hostapd.%s switch_chan '{"freq":%d}'
|
||||||
|
|
|
@ -13,4 +13,8 @@ nav .login {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
padding-left: 2px;
|
padding-left: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,6 +11,7 @@ const RECONNECT_AFTER = 5000,
|
||||||
|
|
||||||
let connectionID = localStorage.getItem('session'),
|
let connectionID = localStorage.getItem('session'),
|
||||||
socket = null,
|
socket = null,
|
||||||
|
sessionInit = false,
|
||||||
connectionEstablished = false;
|
connectionEstablished = false;
|
||||||
|
|
||||||
function newUUID () {
|
function newUUID () {
|
||||||
|
@ -51,7 +52,7 @@ function onopen () {
|
||||||
|
|
||||||
|
|
||||||
export function sendjson (obj, callback) {
|
export function sendjson (obj, callback) {
|
||||||
if (socket.readyState !== 1) {
|
if (socket.readyState !== 1 || (!sessionInit && obj.subject !== 'session_init')) {
|
||||||
query.push({
|
query.push({
|
||||||
'callback': callback,
|
'callback': callback,
|
||||||
'obj': obj
|
'obj': obj
|
||||||
|
@ -79,6 +80,7 @@ function onmessage (raw) {
|
||||||
msg.id = connectionID;
|
msg.id = connectionID;
|
||||||
sendjson(msg);
|
sendjson(msg);
|
||||||
render();
|
render();
|
||||||
|
sessionInit = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue