@samitouri / QOS-React-2 / commits / b74fa9868e

Clean up (#15755)

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.

Sebastian Markbåge committed May 28, 2019 at 14:19 UTC b74fa9868e91f333f5503ea6ce127d508fec1e4c
1 file changed +1 -6
packages/react-reconciler/src/ReactFiberWorkLoop.js
+1 -6
@@ -493,13 +493,8 @@ function scheduleCallbackForRoot(
493 );
494 } else {
495 let options = null;
496 - if (expirationTime !== Sync && expirationTime !== Never) {
496 + if (expirationTime !== Never) {
497 let timeout = expirationTimeToMs(expirationTime) - now();
498 - if (timeout > 5000) {
499 - // Sanity check. Should never take longer than 5 seconds.
500 - // TODO: Add internal warning?
501 - timeout = 5000;
502 - }
498 options = {timeout};
499 }
500