From 18e4d2ba4e0e73cde0ac2d11a40ee1eea6686ad0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20N=C3=A9grier?= Date: Mon, 19 Jul 2021 10:32:31 +0200 Subject: [PATCH] Setting a timeout to map loading --- back/src/Services/MapFetcher.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/back/src/Services/MapFetcher.ts b/back/src/Services/MapFetcher.ts index fa1a831e..9869d26a 100644 --- a/back/src/Services/MapFetcher.ts +++ b/back/src/Services/MapFetcher.ts @@ -23,6 +23,7 @@ class MapFetcher { // - The result of the query is never displayed to the end user const res = await Axios.get(mapUrl, { maxContentLength: 50*1024*1024, // Max content length: 50MB. Maps should not be bigger + timeout: 10000, // Timeout after 10 seconds }); if (!isTiledMap(res.data)) {