Increase map and AJAX request timeouts

Extended the failsafe timeout for map loading from 10 to 60 seconds in the footer and increased the AJAX request timeout in leafembed.js from 30 to 50 seconds to better accommodate slow responses.
这个提交包含在:
Peter Goodhall 2025-08-10 22:08:31 +01:00
父节点 4db4822c09
当前提交 a92d0976ca
共有 2 个文件被更改,包括 3 次插入3 次删除

查看文件

@ -795,14 +795,14 @@ if ($this->session->userdata('user_id') != null) {
$('.warningOnSubmit').hide(); $('.warningOnSubmit').hide();
$('#map-success-alert').addClass('d-none'); $('#map-success-alert').addClass('d-none');
// Failsafe timeout to prevent stuck spinner (10 seconds) // Failsafe timeout to prevent stuck spinner (60 seconds)
const failsafeTimeout = setTimeout(function() { const failsafeTimeout = setTimeout(function() {
console.warn('Map loading timed out - forcing spinner hide'); console.warn('Map loading timed out - forcing spinner hide');
$button.prop('disabled', false); $button.prop('disabled', false);
$spinner.addClass('d-none'); $spinner.addClass('d-none');
$('.warningOnSubmit .warningOnSubmit_txt').text('Map loading timed out. Please try again.'); $('.warningOnSubmit .warningOnSubmit_txt').text('Map loading timed out. Please try again.');
$('.warningOnSubmit').show(); $('.warningOnSubmit').show();
}, 10000); }, 60000);
var customdata = { var customdata = {
'dataPost': { 'dataPost': {

查看文件

@ -73,7 +73,7 @@ function askForPlots(_url_qso, options={}) {
type: 'POST', type: 'POST',
dataType: 'json', dataType: 'json',
data: _dataPost, data: _dataPost,
timeout: 30000, // 30 second timeout timeout: 50000, // 50 second timeout
error: function(xhr, status, error) { error: function(xhr, status, error) {
console.log('[ERROR] ajax askForPlots() function return error:', status, error, xhr); console.log('[ERROR] ajax askForPlots() function return error:', status, error, xhr);
// Call custom error callback if provided // Call custom error callback if provided