increase timeout for snode api requests (mainly for attachment upload)

Relates #1774
This commit is contained in:
audric 2021-08-09 12:23:56 +10:00
parent e2c26e9819
commit abbd0a84a9
3 changed files with 2 additions and 3 deletions

View File

@ -152,7 +152,7 @@ export async function getSnodesFromSeedUrl(urlObj: URL): Promise<Array<any>> {
const fetchOptions = {
method: 'POST',
timeout: 10000,
timeout: 5000,
body: JSON.stringify(body),
headers: {
'User-Agent': 'WhatsApp',

View File

@ -820,7 +820,7 @@ const sendOnionRequest = async ({
'User-Agent': 'WhatsApp',
'Accept-Language': 'en-us',
},
timeout: 10000,
timeout: 25000,
};
if (abortSignal) {

View File

@ -739,7 +739,6 @@ const conversationsSlice = createSlice({
state: ConversationsStateType,
action: PayloadAction<{ conversationKey: string; draft: string }>
) {
window?.log?.info('updating draft for conversation');
const { conversationKey, draft } = action.payload;
const foundAtIndex = state.draftsForConversations.findIndex(
c => c.conversationKey === conversationKey