From dc97dcff6be06d2327a1583d062d9adf814cd93f Mon Sep 17 00:00:00 2001 From: GabrielTrettel Date: Thu, 9 Dec 2021 17:58:19 -0300 Subject: [PATCH] Adding conditional when opening sockets to only do it once --- src/App.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/App.js b/src/App.js index 59ae346..6600f32 100644 --- a/src/App.js +++ b/src/App.js @@ -61,7 +61,8 @@ export default function App() { /> ); } else if (netInfo.isInternetReachable) { - global.formsSockets = useFiltering(global.location || global.defaultLocation); + if (global.formsSockets === undefined) + global.formsSockets = useFiltering(global.location || global.defaultLocation); return (