File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ import { renderToPipeableStream } from "react-dom/server";
12
12
import type { AppLoadContext , EntryContext } from "react-router" ;
13
13
import { ServerRouter } from "react-router" ;
14
14
15
- const ABORT_DELAY = 5_000 ;
15
+ // see: https://reactrouter.com/explanation/special-files#streamtimeout
16
+ export const streamTimeout = 5000 ;
16
17
17
18
export default async function handleRequest (
18
19
request : Request ,
@@ -82,7 +83,7 @@ async function handleBotRequest(
82
83
} ,
83
84
) ;
84
85
85
- setTimeout ( abort , ABORT_DELAY ) ;
86
+ setTimeout ( abort , streamTimeout + 1000 ) ;
86
87
} ) ;
87
88
}
88
89
@@ -129,6 +130,6 @@ async function handleBrowserRequest(
129
130
} ,
130
131
) ;
131
132
132
- setTimeout ( abort , ABORT_DELAY ) ;
133
+ setTimeout ( abort , streamTimeout + 1000 ) ;
133
134
} ) ;
134
135
}
You can’t perform that action at this time.
0 commit comments