@@ -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
0 commit comments