wait4pong can't be longer then qso_window_last_seen in this concept

This commit is contained in:
HB9HIL
2024-09-21 08:13:56 +02:00
parent 599e0bb4a8
commit 43328e07fc

View File

@@ -36,7 +36,7 @@
let bc2qso = new BroadcastChannel('qso_wish');
// set some times
let wait4pong = 4000; // we wait in max 4 seconds for the pong
let wait4pong = 2000; // we wait in max 2 seconds for the pong
let check_intv = 100; // check every 100 ms
let check_pong = setInterval(function() {
@@ -49,8 +49,6 @@
window.close();
} else {
clearInterval(check_pong);
let cl = {};
cl.call = call;
let newWindow = window.open('<?php echo base_url(); ?>' + 'index.php/qso?manual=0', '_blank');
if (!newWindow || newWindow.closed || typeof newWindow.closed === 'undefined') {
@@ -64,7 +62,7 @@
bc2qso.onmessage = function(ev) {
if (ev.data === 'ready') {
bc2qso.postMessage({
call: cl.call
call: call
});
window.close();
}