@@ -23,12 +23,26 @@ const sigalgs = [
23
23
'ed25519' ,
24
24
] . join ( ':' ) ;
25
25
26
+ /**
27
+ * Usually we would create separate timeouts for connecting vs idling.
28
+ * Unfortunately quiche only has 1 config option that controls both.
29
+ * And it is not possible to mutate this option after connecting.
30
+ * Therefore, this option is just a way to set a shorter connecting timeout
31
+ * compared to the idling timeout.
32
+ * If this is the larger than the `maxIdleTimeout` (remember that `0` is `Infinity`) for `maxIdleTimeout`, then this has no effect.
33
+ * This only has an effect if this is set to a number less than `maxIdleTimeout`.
34
+ * Thus, it is the "minimum boundary" of the timeout during connecting.
35
+ * While the `maxIdleTimeout` is still the "maximum boundary" during connecting.
36
+ */
37
+ const minIdleTimeout = Infinity ;
38
+
26
39
const clientDefault : QUICConfig = {
27
40
sigalgs,
28
41
verifyPeer : true ,
29
42
verifyAllowFail : false ,
30
43
grease : true ,
31
- maxIdleTimeout : 1 * 60 * 1000 ,
44
+ keepAliveIntervalTime : undefined ,
45
+ maxIdleTimeout : 0 ,
32
46
maxRecvUdpPayloadSize : quiche . MAX_DATAGRAM_SIZE , // 65527
33
47
maxSendUdpPayloadSize : quiche . MIN_CLIENT_INITIAL_LEN , // 1200,
34
48
initialMaxData : 10 * 1024 * 1024 ,
@@ -48,7 +62,8 @@ const serverDefault: QUICConfig = {
48
62
verifyPeer : false ,
49
63
verifyAllowFail : false ,
50
64
grease : true ,
51
- maxIdleTimeout : 1 * 60 * 1000 ,
65
+ keepAliveIntervalTime : undefined ,
66
+ maxIdleTimeout : 0 ,
52
67
maxRecvUdpPayloadSize : quiche . MAX_DATAGRAM_SIZE , // 65527
53
68
maxSendUdpPayloadSize : quiche . MIN_CLIENT_INITIAL_LEN , // 1200
54
69
initialMaxData : 10 * 1024 * 1024 ,
@@ -188,4 +203,4 @@ function buildQuicheConfig(config: QUICConfig): QuicheConfig {
188
203
return quicheConfig ;
189
204
}
190
205
191
- export { clientDefault , serverDefault , buildQuicheConfig } ;
206
+ export { minIdleTimeout , clientDefault , serverDefault , buildQuicheConfig } ;
0 commit comments