Commit f228a33
Adopt a custom shared client (#18)
### Motivation
We previously defaulted the HTTPClient to .init(), but that's not
correct as it was never getting shut down.
### Modifications
Instead of creating a new client, just introduce our own shared one and
use that as the default value.
Once AHC provides a shared client, we can default to that in the
configuration initializer.
### Result
No more crashing clients on dealloc.
### Test Plan
All tests pass.
---------
Co-authored-by: David Nadoba <[email protected]>1 parent 7e40bff commit f228a33
File tree
2 files changed
+12
-11
lines changed- Sources/OpenAPIAsyncHTTPClient
- Tests/OpenAPIAsyncHTTPClientTests
2 files changed
+12
-11
lines changedLines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
71 | 79 | | |
72 | 80 | | |
73 | 81 | | |
74 | 82 | | |
75 | 83 | | |
76 | 84 | | |
| 85 | + | |
77 | 86 | | |
78 | | - | |
79 | | - | |
| 87 | + | |
| 88 | + | |
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
| |||
Lines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | 85 | | |
94 | | - | |
| 86 | + | |
95 | 87 | | |
96 | 88 | | |
97 | 89 | | |
| |||
0 commit comments