-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fix crash when starting a request on an invalidated session #829
base: wpios-edition
Are you sure you want to change the base?
Conversation
b187132
to
df614dc
Compare
df614dc
to
fede7bd
Compare
Generated by 🚫 Danger |
a8c0029
to
fede7bd
Compare
@@ -105,6 +105,8 @@ open class WordPressComRestApi: NSObject { | |||
|
|||
private var useEphemeralSession: Bool | |||
|
|||
private var isInvalidated = false |
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.
What do you think about changing those URLSession properties to Optional instead and assigning them to nil in the invalidateAndCancelTasks
function?
@@ -202,6 +208,7 @@ open class WordPressComRestApi: NSObject { | |||
success: @escaping SuccessResponseBlock, | |||
failure: @escaping FailureReponseBlock) -> Progress? { | |||
let progress = Progress.discreteProgress(totalUnitCount: 100) | |||
print("GET:", Thread.callStackSymbols) |
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.
Remove the print statements before merging.
Description
Fixes #
ℹ Please replace the above with a link to the issue this pull request addresses, as well as a summary of the implementation details.
Testing Details
ℹ Please replace this with a clear and concise description of the steps required to validate this pull request.
CHANGELOG.md
if necessary.