| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 9fb1eb0 commit bf56dec
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -138,6 +138,7 @@ function getServeAwait(getCLS, setCLS) { | |||
| 138 | 138 | setCLS(Math.random()); | |
| 139 | 139 | await sleep(10); | |
| 140 | 140 | await read(__filename); | |
| 141 | + if (res.destroyed) return; | ||
| 141 | 142 | res.setHeader('content-type', 'application/json'); | |
| 142 | 143 | res.end(JSON.stringify({ cls: getCLS() })); | |
| 143 | 144 | }; | |
@@ -148,6 +149,7 @@ function getServeCallbacks(getCLS, setCLS) { | |||
| 148 | 149 | setCLS(Math.random()); | |
| 149 | 150 | setTimeout(() => { | |
| 150 | 151 | readFile(__filename, () => { | |
| 152 | + if (res.destroyed) return; | ||
| 151 | 153 | res.setHeader('content-type', 'application/json'); | |
| 152 | 154 | res.end(JSON.stringify({ cls: getCLS() })); | |
| 153 | 155 | }); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments