|
|
@ -676,7 +676,6 @@ export class SwarmPolling {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public async pollOnceForOurDisplayName(abortSignal?: AbortSignal): Promise<string> {
|
|
|
|
public async pollOnceForOurDisplayName(abortSignal?: AbortSignal): Promise<string> {
|
|
|
|
try {
|
|
|
|
|
|
|
|
if (abortSignal?.aborted) {
|
|
|
|
if (abortSignal?.aborted) {
|
|
|
|
throw new NotFoundError('[pollOnceForOurDisplayName] aborted right away');
|
|
|
|
throw new NotFoundError('[pollOnceForOurDisplayName] aborted right away');
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -730,15 +729,5 @@ export class SwarmPolling {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
return displayName;
|
|
|
|
return displayName;
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
if (e.message === ERROR_CODE_NO_CONNECT) {
|
|
|
|
|
|
|
|
if (window.inboxStore?.getState().onionPaths.isOnline) {
|
|
|
|
|
|
|
|
window.inboxStore?.dispatch(updateIsOnline(false));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} else if (!window.inboxStore?.getState().onionPaths.isOnline) {
|
|
|
|
|
|
|
|
window.inboxStore?.dispatch(updateIsOnline(true));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
throw e;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|