increase timeout allowed for joining open group

pull/1323/head
Audric Ackermann 5 years ago
parent 0b54fb2f0a
commit 0721d469db
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -467,6 +467,7 @@ export class LeftPaneMessageSection extends React.Component<Props, State> {
id: 'connectToServer', id: 'connectToServer',
type: 'success', type: 'success',
}); });
this.setState({ loading: true });
await OpenGroup.join(serverUrl, async () => { await OpenGroup.join(serverUrl, async () => {
if (await OpenGroup.serverExists(serverUrl)) { if (await OpenGroup.serverExists(serverUrl)) {
ToastUtils.push({ ToastUtils.push({
@ -474,9 +475,8 @@ export class LeftPaneMessageSection extends React.Component<Props, State> {
id: 'connectToServer', id: 'connectToServer',
type: 'success', type: 'success',
}); });
this.setState({ loading: true });
} }
this.setState({ loading: false });
}); });
const openGroupConversation = await OpenGroup.getConversation(serverUrl); const openGroupConversation = await OpenGroup.getConversation(serverUrl);
@ -498,6 +498,7 @@ export class LeftPaneMessageSection extends React.Component<Props, State> {
id: 'connectToServer', id: 'connectToServer',
type: 'error', type: 'error',
}); });
this.setState({ loading: false });
} finally { } finally {
this.setState({ this.setState({
loading: false, loading: false,

@ -129,7 +129,7 @@ export class OpenGroup {
conversation = await PromiseUtils.timeout( conversation = await PromiseUtils.timeout(
window.attemptConnection(prefixedServer, channel), window.attemptConnection(prefixedServer, channel),
5000 15000
); );
if (!conversation) { if (!conversation) {
throw new Error(window.i18n('connectToServerFail')); throw new Error(window.i18n('connectToServerFail'));

Loading…
Cancel
Save