mirror of
https://git.coolaj86.com/coolaj86/telebit.js.git
synced 2025-04-21 19:40:37 +00:00
bugfixes and comments
This commit is contained in:
parent
eb27cde8c0
commit
ce00a9c721
@ -428,10 +428,14 @@ function serveControlsHelper() {
|
|||||||
function serveControls() {
|
function serveControls() {
|
||||||
if (!state.config.disable) {
|
if (!state.config.disable) {
|
||||||
if (state.config.relay && (state.config.token || state.config.agreeTos)) {
|
if (state.config.relay && (state.config.token || state.config.agreeTos)) {
|
||||||
|
setTimeout(function () {
|
||||||
|
// TODO move back to callback once mutual-dependency on clientside init is resolved
|
||||||
|
// (requires moving token fetching to clientside)
|
||||||
|
serveControlsHelper();
|
||||||
|
}, 350);
|
||||||
rawTunnel(function (err, _tun) {
|
rawTunnel(function (err, _tun) {
|
||||||
if (err) { throw err; }
|
if (err) { throw err; }
|
||||||
tun = _tun;
|
tun = _tun;
|
||||||
serveControlsHelper();
|
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -509,6 +513,7 @@ function rawTunnel(rawCb) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO move to client bin/telebit.js
|
||||||
common.api.token(state, {
|
common.api.token(state, {
|
||||||
error: function (err/*, next*/) {
|
error: function (err/*, next*/) {
|
||||||
console.error("[Error] common.api.token:");
|
console.error("[Error] common.api.token:");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user