fix(providers): time out connection tests and guard undefined names
Apply a 15s AbortSignal timeout in fetchWithConnectionProxy when the caller supplies none, so provider connection tests stop hanging and exhausting the browser socket pool. Also make matchSearch return false for falsy provider names instead of crashing the providers page.
This commit is contained in:
1 parent
dff648496c
commit
df85e16d7a
2 files changed
+11
-3
No files matched your search
@@ -115,9 +115,11 @@ export default function ProvidersPage() {
|
||||
return () => unregisterSearch();
|
||||
}, [registerSearch, unregisterSearch]);
|
||||
|
||||
const matchSearch = (name) =>
|
||||
!searchQuery.trim() ||
|
||||
name.toLowerCase().includes(searchQuery.trim().toLowerCase());
|
||||
const matchSearch = (name) => {
|
||||
if (!searchQuery.trim()) return true;
|
||||
if (!name) return false;
|
||||
return name.toLowerCase().includes(searchQuery.trim().toLowerCase());
|
||||
};
|
||||
|
||||
const sortByPriority = (entries, authType) =>
|
||||
[...entries].sort(([ka, a], [kb, b]) => {
|
||||
|
||||
Reference in new issue
Block a user