clear the request timeout when adding/updating domain
DO API takes very long to respond at times :/ Currently, there is no easy way to reset the timeout middleware timeout. We should add this feature upstream (https://github.com/expressjs/timeout/issues/26)
This commit is contained in:
@@ -60,7 +60,9 @@ function initializeExpressSync() {
|
||||
router.del = router.delete; // amend router.del for readability further on
|
||||
|
||||
app
|
||||
.use(middleware.timeout(REQUEST_TIMEOUT))
|
||||
// the timeout middleware will respond with a 503. the request itself cannot be 'aborted' and will continue
|
||||
// search for req.clearTimeout in route handlers to see places where this timeout is reset
|
||||
.use(middleware.timeout(REQUEST_TIMEOUT, { respond: true }))
|
||||
.use(json)
|
||||
.use(urlencoded)
|
||||
.use(middleware.cookieParser())
|
||||
|
||||
Reference in New Issue
Block a user