Skip to content

Commit

Permalink
add response and connection timeouts for api calls
Browse files Browse the repository at this point in the history
  • Loading branch information
secondl1ght committed Jan 21, 2024
1 parent ce2f75f commit 709d0aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import { reportsSync } from '$lib/sync/reports';
import { usersSync } from '$lib/sync/users';
import { SvelteToast } from '@zerodevx/svelte-toast';
import axios from 'axios';
import 'leaflet.locatecontrol/dist/L.Control.Locate.min.css';
import 'leaflet.markercluster/dist/MarkerCluster.Default.css';
import 'leaflet.markercluster/dist/MarkerCluster.css';
Expand All @@ -16,6 +17,9 @@
import 'tippy.js/dist/tippy.css';
import '../app.css';
axios.defaults.timeout = 10000;
axios.defaults.signal = AbortSignal.timeout(10000);
const options = {
reversed: true,
intro: { y: 192 },
Expand Down

0 comments on commit 709d0aa

Please sign in to comment.