1
0
Fork 0
mirror of https://github.com/overleaf/overleaf.git synced 2025-03-21 06:31:16 +00:00

Merge pull request from overleaf/spd-templates-timeouts

Add timeout to template web requests

GitOrigin-RevId: 48e979af3171766494ef25a14d7878144a632253
This commit is contained in:
Alasdair Smith 2019-11-05 14:00:28 +00:00 committed by sharelatex
parent e035d526d6
commit fbc95f2514

View file

@ -45,7 +45,8 @@ const TemplatesManager = {
auth: {
user: settings.apis.v1.user,
pass: settings.apis.v1.pass
}
},
timeout: 60 * 1000
})
zipReq.on('error', function(err) {
logger.warn({ err }, 'error getting zip from template API')
@ -175,7 +176,8 @@ const TemplatesManager = {
},
resolveWithFullResponse: true,
simple: false,
json: true
json: true,
timeout: 60 * 1000
})
if (statusCode === 404) {