File tree 3 files changed +4
-28
lines changed
3 files changed +4
-28
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ library
166
166
, recv >= 0.1 && < 0.2
167
167
, stm >= 2.5 && < 2.6
168
168
, text >= 1.2 && < 2.2
169
- , time-manager >= 0.2.1 && < 0.3
169
+ , time-manager >= 0.2.2 && < 0.3
170
170
, tls >= 1.7 && < 2.2
171
171
, unbounded-delays >= 0.1.1 && < 0.2
172
172
, unordered-containers >= 0.2 && < 0.3
Original file line number Diff line number Diff line change 1
- {-# LANGUAGE CPP #-}
2
-
3
1
-- | Public 'Compression' API
4
2
--
5
3
-- Intended for qualified import.
Original file line number Diff line number Diff line change 1
- {-# LANGUAGE CPP #-}
2
-
3
- #include "MachDeps.h"
4
-
5
1
module Network.GRPC.Util.HTTP2 (
6
2
-- * General auxiliary
7
3
fromHeaderTable
@@ -219,26 +215,8 @@ mkTlsSettings http2Settings keyLogger =
219
215
withTimeManager :: (Time. Manager -> IO a ) -> IO a
220
216
withTimeManager = TimeManager. withManager (disableTimeout * 1_000_000 )
221
217
222
- -- | Work around the fact that we cannot disable timeouts in http2/http2-tls
218
+ -- | Disable timeouts in http2/http2-tls
223
219
--
224
- -- TODO: <https://github.com/well-typed/grapesy/issues/123>
225
- -- We need a proper solution for this.
220
+ -- A value of 0 (or lower) disables timeouts as of @time-manager-0.2.2@.
226
221
disableTimeout :: Int
227
- disableTimeout =
228
- #if (WORD_SIZE_IN_BITS == 64)
229
- -- Set a really high timeout to effectively disable timeouts (100 years)
230
- --
231
- -- NOTE: We cannot use 'maxBound' here, because this value is multiplied
232
- -- by @1_000_000@ in 'Network.Run.TCP.Timeout.runTCPServerWithSocket'
233
- -- (in @network-run@).
234
- 100 * 365 * 24 * 60 * 60
235
- #else
236
- #warning "Timeout for RPC messages is set to 30 minutes on 32-bit systems."
237
- #warning "See https://github.com/kazu-yamamoto/http2/issues/112"
238
- -- Unfortunately, the same trick does not work on 32-bit systems, where we
239
- -- simply don't have enough range. The maximum timeout we can support here
240
- -- is roughly 35 mins. We set it to 30 minutes exactly, to at least provide
241
- -- a clue if the timeout does hit (1_800_000_000 < 2_147_483_647).
242
- 30 * 60
243
- #endif
244
-
222
+ disableTimeout = 0
You can’t perform that action at this time.
0 commit comments