Set a timeout for superagent
The default is 'no timeout' and it will wait for the response forever. https://github.com/visionmedia/superagent/issues/17#issuecomment-207742985
This commit is contained in:
@@ -91,6 +91,7 @@ function authenticate(req, res, next) {
|
||||
superagent
|
||||
.post(config.internalAdminOrigin() + '/api/v1/oauth/token')
|
||||
.query(query).send(data)
|
||||
.timeout(30 * 1000)
|
||||
.end(function (error, result) {
|
||||
if (error && !error.response) {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user