Repository navigation
fix(libSceHttp2): complete sceHttp2SendRequestAsync offline instead of throwing - #41
Merged
Merged
Conversation
12 tasks done
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The nightly built from main after the upstream sync (#34) aborts a title about 7 seconds after boot:
sceHttp2SendRequestAsyncthrows "not implemented" (SIGABRT). Upstream removed the offline completion when it added its synchronous HTTP/2 transport, so the async send,sceHttp2WaitAsyncandsceHttp2ReadDataAsyncnow throw. The fork's pre-#34 code (f05284d) answered with the library's network error and the title carried on. Any title that submits requests asynchronously dies, not one game.This restores that behaviour and nothing more (no request reaches the network on this path):
sceHttp2SendRequestAsyncqueues one completion (req_id, result0x80436063, the library's network error), triggers the user event of the kqueue option and returns 0. Unchanged from pre-chore(sync): merge upstream boykopovar/AnyPS5 up to ca0e955 #34: an unknown request id answers the invalid-id error, and an extra option or a failed event trigger still throw.sceHttp2WaitAsyncreturns the queued completion; it throws when nothing is queued.sceHttp2ReadDataAsyncreturns the network error.sceHttp2GetStatusCode,sceHttp2ReadDataandsceHttp2GetResponseContentLengthwith the network error instead of throwing "has not been sent". A request that was never submitted still throws as upstream's tests expect.Overlap with #33 (@hypermoist, T52): #33 rewrites these same functions to transmit over mbedTLS and queue the real result, and removes this debt entry. That is the real fix; this is the minimum that stops the abort until it lands. I did not complete the async request through the synchronous transport: a send on the caller's thread would block a game thread on the network for seconds, and doing it on a worker needs the teardown rules #33 is already defining. When #33 merges, take its version of
Export.cppandGuestHttp2.cppfor these functions; the conflict is those hunks only.core/libs/tests/GuestHttp2.cpphad asserted that the async calls throw (upstream's test); it now checks the return values, the event, the completion, the follow-up calls and the invalid and deleted ids, on a separate request so the existing "unsent request throws" checks stay.Tested
Syntax-checked
Export.cppandGuestHttp2.cppwith g++ (-fsyntax-only). The C++ tree is not built locally; the dispatched build runsguest_http2.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repositoryNeed help on this PR? Tag
@codesmith-botwith what you need.