expirationTime has already been checked if it's sync.

timeout can now be longer than 5 seconds when a suspense config is used.
We might want to adjust the heuristics but it's not internally consistent
without this.
This commit is contained in:
Sebastian Markbåge
2019-05-28 14:19:51 -07:00
committed by GitHub
parent d915a4c1f1
commit b74fa9868e
+1 -6
View File
@@ -493,13 +493,8 @@ function scheduleCallbackForRoot(
);
} else {
let options = null;
if (expirationTime !== Sync && expirationTime !== Never) {
if (expirationTime !== Never) {
let timeout = expirationTimeToMs(expirationTime) - now();
if (timeout > 5000) {
// Sanity check. Should never take longer than 5 seconds.
// TODO: Add internal warning?
timeout = 5000;
}
options = {timeout};
}