From 98b9232a4d9cda7bb329261cdcf77e6ca44f6419 Mon Sep 17 00:00:00 2001
From: Mohammad Torkashvand <mohammad.torkashvand@geant.org>
Date: Tue, 4 Jun 2024 15:26:12 +0200
Subject: [PATCH] add axoid timeout

---
 pages/maps/index.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/pages/maps/index.tsx b/pages/maps/index.tsx
index acb93fd..958b212 100644
--- a/pages/maps/index.tsx
+++ b/pages/maps/index.tsx
@@ -10,6 +10,8 @@ interface MapsProps {
   networkTopologyData: NetworkTopologyData;
 }
 
+const AXIOS_TIMEOUT = 10000; // 10 seconds
+
 const MapsPage: NextPage<MapsProps> = ({ networkTopologyData }) => {
   return (
     <WfoPolicyRenderPageFallback resource={GSOPolicyResource.NAVIGATION_MAPS}>
@@ -20,7 +22,9 @@ const MapsPage: NextPage<MapsProps> = ({ networkTopologyData }) => {
 
 export const getServerSideProps: GetServerSideProps = async () => {
   try {
-    const response = await axios.get(process.env.NETWORK_TOPOLOGY_API_URL!);
+    const response = await axios.get(process.env.NETWORK_TOPOLOGY_API_URL!, {
+      timeout: AXIOS_TIMEOUT,
+    });
     const networkTopologyData: NetworkTopologyData = response.data;
 
     return {
-- 
GitLab