| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 0e16120 commit 37364ab
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,9 +14,6 @@ function performRequestWithDelay(client, firstDelay, secondDelay, closeAfter) { | |||
| 14 | 14 | client.resume(); | |
| 15 | 15 | client.write('GET / HTTP/1.1\r\n'); | |
| 16 | 16 | ||
| 17 | - firstDelay = common.platformTimeout(firstDelay); | ||
| 18 | - secondDelay = common.platformTimeout(secondDelay); | ||
| 19 | - | ||
| 20 | 17 | setTimeout(() => { | |
| 21 | 18 | client.write('Connection: '); | |
| 22 | 19 | }, firstDelay).unref(); | |
@@ -27,12 +24,12 @@ function performRequestWithDelay(client, firstDelay, secondDelay, closeAfter) { | |||
| 27 | 24 | }, firstDelay + secondDelay).unref(); | |
| 28 | 25 | } | |
| 29 | 26 | ||
| 30 | - const headersTimeout = common.platformTimeout(1000); | ||
| 27 | + const headersTimeout = common.platformTimeout(2000); | ||
| 31 | 28 | const server = createServer({ | |
| 32 | 29 | headersTimeout, | |
| 33 | 30 | requestTimeout: 0, | |
| 34 | 31 | keepAliveTimeout: 0, | |
| 35 | - connectionsCheckingInterval: common.platformTimeout(250), | ||
| 32 | + connectionsCheckingInterval: headersTimeout / 4, | ||
| 36 | 33 | }, common.mustCallAtLeast((req, res) => { | |
| 37 | 34 | res.writeHead(200, { 'Content-Type': 'text/plain' }); | |
| 38 | 35 | res.end(); | |
@@ -60,7 +57,7 @@ server.listen(0, common.mustCall(() => { | |||
| 60 | 57 | 'HTTP/1.1 200 OK' | |
| 61 | 58 | ); | |
| 62 | 59 | ||
| 63 | - const defer = common.platformTimeout(headersTimeout * 1.5); | ||
| 60 | + const defer = headersTimeout * 1.5; | ||
| 64 | 61 | ||
| 65 | 62 | // Wait some time to make sure headersTimeout | |
| 66 | 63 | // does not interfere with keep alive | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,9 +14,6 @@ function performRequestWithDelay(client, firstDelay, secondDelay, closeAfter) { | |||
| 14 | 14 | client.resume(); | |
| 15 | 15 | client.write('GET / HTTP/1.1\r\n'); | |
| 16 | 16 | ||
| 17 | - firstDelay = common.platformTimeout(firstDelay); | ||
| 18 | - secondDelay = common.platformTimeout(secondDelay); | ||
| 19 | - | ||
| 20 | 17 | setTimeout(() => { | |
| 21 | 18 | client.write('Connection: '); | |
| 22 | 19 | }, firstDelay).unref(); | |
@@ -27,12 +24,12 @@ function performRequestWithDelay(client, firstDelay, secondDelay, closeAfter) { | |||
| 27 | 24 | }, firstDelay + secondDelay).unref(); | |
| 28 | 25 | } | |
| 29 | 26 | ||
| 30 | - const requestTimeout = common.platformTimeout(1000); | ||
| 27 | + const requestTimeout = common.platformTimeout(2000); | ||
| 31 | 28 | const server = createServer({ | |
| 32 | 29 | headersTimeout: 0, | |
| 33 | 30 | requestTimeout, | |
| 34 | 31 | keepAliveTimeout: 0, | |
| 35 | - connectionsCheckingInterval: common.platformTimeout(250), | ||
| 32 | + connectionsCheckingInterval: requestTimeout / 4 | ||
| 36 | 33 | }, common.mustCallAtLeast((req, res) => { | |
| 37 | 34 | res.writeHead(200, { 'Content-Type': 'text/plain' }); | |
| 38 | 35 | res.end(); | |
@@ -58,7 +55,7 @@ server.listen(0, common.mustCall(() => { | |||
| 58 | 55 | 'HTTP/1.1 200 OK' | |
| 59 | 56 | ); | |
| 60 | 57 | ||
| 61 | - const defer = common.platformTimeout(requestTimeout * 1.5); | ||
| 58 | + const defer = requestTimeout * 1.5; | ||
| 62 | 59 | ||
| 63 | 60 | // Wait some time to make sure requestTimeout | |
| 64 | 61 | // does not interfere with keep alive | |
| Back | FazBrowse Home | New Git URL |
0 commit comments