Merged
Conversation
67c8ff1 to
f2471ee
Compare
added 2 commits
October 26, 2025 10:50
Address issues where DMSG client utilities would not respond to Ctrl+C: - Use signal-aware context for dmsgC.Serve() instead of context.Background() in internal/cli, pkg/direct, and dmsgpty-host - Add context cancellation check in dmsg-socks5 accept loop to properly exit on signal - Implement graceful HTTP server shutdown with 5-second timeout in dmsghttp - Ensure dmsgC.Close() is called via defer in dmsgpty-host for proper cleanup - Add WaitGroup wait in direct client stop function for clean goroutine shutdown - Document temporary kill.go workaround for verification testing These changes ensure client utilities properly respond to interrupt signals without requiring multiple Ctrl+C presses.
Protect concurrent access to sm.yamux and sm.smux fields with sm.mutx lock to prevent data races when Close() or Ping() are called while session is being initialized. The race occurred when: - handleSession() writes to dSes.sm.yamux (server.go:242) while holding the lock - Close() reads sc.sm.yamux (session_common.go:187-188) without holding the lock - A goroutine can call Close() concurrently during session setup Changes: - Add sm.mutx.Lock() protection in Close() method - Add sm.mutx.RLock() protection in Ping() method for consistency
56637bf to
1ec064b
Compare
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.
Fixes # #318