fix: macOS server crash when client disconnects abruptly - #9331
Merged
Conversation
sithlord48
reviewed
Jan 10, 2026
sithlord48
approved these changes
Jan 10, 2026
sithlord48
left a comment
Member
There was a problem hiding this comment.
Ok Ill leave this to @nbolton to land after his review
8 tasks
Member
|
I wonder if this could fix also #9314 (Had the reporting user check and this seams to so adding to the list of bugs this closes) |
nbolton
approved these changes
Jan 12, 2026
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.
Summary
Fixes server crash with exit code 13 (SIGPIPE) on macOS when a Windows client disconnects abruptly (e.g., shutdown/restart without stopping Deskflow first).
Problem
When a client disconnects unexpectedly, the server attempts to write to the closed socket (via OpenSSL's
SSL_writeorSSL_shutdown), which generates a SIGPIPE signal that terminates the process.Related log output:
Solution
Two-layer fix:
SO_NOSIGPIPEsocket option on macOS (ArchNetworkBSD.cpp)newSocket()acceptSocket()Quiet TLS shutdown (
SecureSocket.cpp)SSL_set_quiet_shutdown()beforeSSL_shutdown()infreeSSL()Related Issues
Fixes #9141
Fixes #9314
Contribution by Gittensor, see my contribution statistics at https://gittensor.io/miners/details?githubId=132382032