@@ -23,12 +23,26 @@ const sigalgs = [
2323 'ed25519' ,
2424] . join ( ':' ) ;
2525
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+
2639const clientDefault : QUICConfig = {
2740 sigalgs,
2841 verifyPeer : true ,
2942 verifyAllowFail : false ,
3043 grease : true ,
31- maxIdleTimeout : 1 * 60 * 1000 ,
44+ keepAliveIntervalTime : undefined ,
45+ maxIdleTimeout : 0 ,
3246 maxRecvUdpPayloadSize : quiche . MAX_DATAGRAM_SIZE , // 65527
3347 maxSendUdpPayloadSize : quiche . MIN_CLIENT_INITIAL_LEN , // 1200,
3448 initialMaxData : 10 * 1024 * 1024 ,
@@ -48,7 +62,8 @@ const serverDefault: QUICConfig = {
4862 verifyPeer : false ,
4963 verifyAllowFail : false ,
5064 grease : true ,
51- maxIdleTimeout : 1 * 60 * 1000 ,
65+ keepAliveIntervalTime : undefined ,
66+ maxIdleTimeout : 0 ,
5267 maxRecvUdpPayloadSize : quiche . MAX_DATAGRAM_SIZE , // 65527
5368 maxSendUdpPayloadSize : quiche . MIN_CLIENT_INITIAL_LEN , // 1200
5469 initialMaxData : 10 * 1024 * 1024 ,
@@ -188,4 +203,4 @@ function buildQuicheConfig(config: QUICConfig): QuicheConfig {
188203 return quicheConfig ;
189204}
190205
191- export { clientDefault , serverDefault , buildQuicheConfig } ;
206+ export { minIdleTimeout , clientDefault , serverDefault , buildQuicheConfig } ;
0 commit comments