Closed jrconlin closed 4 years ago
Merging #1394 into master will decrease coverage by
0.01%
. The diff coverage is97.33%
.
@@ Coverage Diff @@
## master #1394 +/- ##
==========================================
- Coverage 99.74% 99.72% -0.02%
==========================================
Files 64 64
Lines 10476 10537 +61
==========================================
+ Hits 10449 10508 +59
- Misses 27 29 +2
Impacted Files | Coverage Δ | |
---|---|---|
autopush/router/apns2.py | 98.07% <95.65%> (-1.93%) |
:arrow_down: |
autopush/router/apnsrouter.py | 100.00% <100.00%> (ø) |
|
autopush/tests/test_router.py | 99.90% <100.00%> (+<0.01%) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 00aaab4...0e494b9. Read the comment docs.
NOTE: going to ice this PR for the time being.
After discussions with @pjenvey, this hack may work, but what's really needed is more visibility into whatever error may actually be occurring. The HTTP2 library we use is fairly robust and should be able to handle any invalid state naturally.
Keeping this PR and branch in reserve in case it's needed.
Closes #1393
Description
I don't believe that these connections are being closed, and eventually we wind up with old, mostly idle connections that Apple frowns upon. Also, APNS is not really "heavy use" so we can probably turn off the pre-connection pool and just connect when need be.
TODO: find a better reaper than just calling out to Thread.
Testing
There are unit tests. With debugging enabled, idle connections should time out after about 5 min.
Issue(s)
Closes #1393.