metadata-fe: timeout preview fetch

This commit is contained in:
Liam Fitzgerald 2021-06-22 05:43:24 +10:00
parent fac22be28a
commit be666d784b
No known key found for this signature in database
GPG Key ID: D390E12C61D1CFFB

View File

@ -35,7 +35,7 @@ const useMetadataState = createState<MetadataState>(
return state.previews[group];
}
try {
const preview = await airlock.subscribeOnce('metadata-pull-hook', `/preview${group}`);
const preview = await airlock.subscribeOnce('metadata-pull-hook', `/preview${group}`, 20 * 1000);
if('metadata-hook-update' in preview) {
const newState = get();
newState.set((s) => {