File tree 3 files changed +277
-279
lines changed
3 files changed +277
-279
lines changed Original file line number Diff line number Diff line change @@ -17,8 +17,6 @@ import { getLanguage } from '~/utils/i18n-utils';
17
17
18
18
/* eslint-disable no-param-reassign */
19
19
20
- const ABORT_DELAY = 5_000 ;
21
-
22
20
export default async function handleRequest (
23
21
request : Request ,
24
22
responseStatusCode : number ,
@@ -45,7 +43,7 @@ export default async function handleRequest(
45
43
46
44
const { pipe, abort } = renderToPipeableStream (
47
45
< I18nextProvider i18n = { i18n } >
48
- < ServerRouter context = { routerContext } url = { request . url } abortDelay = { ABORT_DELAY } nonce = { loadContext . nonce } />
46
+ < ServerRouter context = { routerContext } url = { request . url } nonce = { loadContext . nonce } />
49
47
</ I18nextProvider > ,
50
48
{
51
49
[ readyOption ] ( ) {
@@ -80,7 +78,10 @@ export default async function handleRequest(
80
78
} ,
81
79
) ;
82
80
83
- setTimeout ( abort , ABORT_DELAY ) ;
81
+ // Abort the streaming render pass after 11 seconds
82
+ // to allow the rejected boundaries to be flushed
83
+ // see: https://reactrouter.com/explanation/special-files#streamtimeout
84
+ setTimeout ( abort , 10_000 ) ;
84
85
} ) ;
85
86
}
86
87
You can’t perform that action at this time.
0 commit comments