-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Revert usage of HTTPClient.shared
#193
Conversation
This reverts commit bf86a01.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments but nothing blocking
@@ -49,7 +49,7 @@ actor DefaultAutoFaqsService: AutoFaqsService { | |||
} | |||
} | |||
|
|||
let httpClient: HTTPClient = .shared | |||
var httpClient: HTTPClient! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this an IUO
@@ -10,7 +10,7 @@ import NIOHTTP1 | |||
|
|||
actor DefaultFaqsService: FaqsService { | |||
|
|||
let httpClient: HTTPClient = .shared | |||
var httpClient: HTTPClient! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IUO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a reason although i don't remember it off-hand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They are likely initialized first, then populated with the http client.
Revert commits related to using
HTTPClient.shared
.I don't think using the shared HTTPClient is necessary for Penny. It only moves Penny out of the control of the
HTTPClient
.