network: handle SO_NBIO on non-Windows hosts #954
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!954
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/954/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Aryansh1520 on GitHub · 2026-10-01 09:30 UTC · original
Aryansh1520:fix/linux-socket-nbio→main· +29 −7 · 1 files · 3 commits · merged 2026-10-01 13:54 UTCProblem
Setsockoptonly translated the guestSOL_SOCKET/SO_NBIO(0x1200) option under_WIN32. On Linux/macOS it fell through to the TCP-only path and returnedENOPROTOOPT.God of War Sons of Sparta (PPSA28997) initialises FMOD Studio with
FMOD_STUDIO_INIT_LIVEUPDATE. The Live Update listener setsSO_NBIOon its socket; when that fails, the Studio async manager latchesFMOD_ERR_NET_CONNECT, and every blocking Studio call afterwards fails. All eightloadBankFilecalls returnedFMOD_ERR_NOTREADY, so on Linux:FMODUnity.RuntimeManager.HaveAllBanksLoaded, whose counter stays at 8.Fix
Handle
SO_NBIOon every host:ioctlsocket(FIONBIO)on Windows (unchanged),fcntltogglingO_NONBLOCKelsewhere (the same mechanismSocketalready uses for P2P sockets).Testing
EINPROGRESS,EALREADY,ECONNREFUSED, ...) that previously reached the guest asEIO; this path becomes reachable once guests can enable nonblocking mode.@coderabbitai[bot] on GitHub · 2026-10-01 09:34 UTC · original · edited 2026-10-01 09:57 UTC
Navigate logical layers of code changes, visualize relationships, and explore their blast radius.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
ab85b3ed-170d-404d-86cb-2435544c7838📥 Commits
Reviewing files that changed from the base of the PR and between
7a784dad96and9905e55489.📒 Files selected for processing (1)
src/libs/network.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 6 remain after this review.
📝 Walkthrough
Walkthrough
On non-Windows systems,
ConvertHostSocketErrormaps additional host socket errors to guest POSIX errors.SetsockopthandlesORBIS_SO_NBIOon Windows and POSIX systems. Windows usesioctlsocket; POSIX usesfcntlto set or clearO_NONBLOCKwhile preserving other flags. Failures return through host socket error conversion.Suggested reviewers:
nmzikPriority: ⬆️ High
Change: Bug fix
Merge Risk: ⚪ Minimal · up to
9905ePending connections and would-block results now retain their expected guest error statuses. No concrete merge-blocking risk remains; the change is ready for normal checks.
Security Architecture Review
Security architecture risk: ⚪ Minimal · up to
9905eThe inspected changes enable nonblocking behavior for existing sockets without adding destinations or privileges. Socket validation and lifetime protection remain intact, and no material new security risk was identified.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment
@coderabbitai helpto get the list of available commands.@coderabbitai[bot] on GitHub · 2026-10-01 09:34 UTC · original · reviewed
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository: KytyPS5/KytyPS5/.coderabbit.yaml
Review profile: CHILL
Plan: Advanced
Run ID:
3ebe9f55-f661-4c85-b8da-68613c1b132b📥 Commits
Reviewing files that changed from the base of the PR and between
b7a1fac898and7a784dad96.📒 Files selected for processing (1)
src/libs/network.cppIncluded review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.
@Aryansh1520 on GitHub · 2026-10-01 09:38 UTC · original
Addressed the nonblocking-connect finding in
9905e55: the POSIX branch ofConvertHostSocketErrornow mapsEINPROGRESS/EALREADYand the other connection errors the Windows branch already handles, instead of falling back toEIO. Re-tested PPSA28997 on Linux: still reaches the main menu with audio.The docstring-coverage warning doesn't apply here; the surrounding networking code doesn't use docstrings.