fix: connect to backend immediately on channel active for server-first protocols(#794)#813
Merged
jglogan merged 1 commit intoapple:mainfrom Dec 1, 2025
Merged
Conversation
58d6c11 to
385f421
Compare
|
The problem also breaks connecting mysql service with port forwarding. |
Contributor
Author
can you go bit in detail please. |
d924d1f to
1ffc7e9
Compare
Contributor
|
@Ronitsabhaya75 Thanks for the simplification+fix! Let's get this into the release. @liufeng-xiwo I don't know whether I've seen this issue with mysql. If you still have a problem there, feel free to create another issue and provide the steps that would allow us to reproduce the problem you see. |
jglogan
approved these changes
Dec 1, 2025
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.
Type of Change
Motivation and Context
closes #794
TCP port forwarding currently fails for server-first protocols (SMTP, FTP, SSH, PostgreSQL) because the backend connection is only established when the client sends data.
Current behavior in
ConnectHandler.swift:This breaks any protocol where the server speaks first.
The fix:
Connect to the backend immediately when the channel becomes active, not when data arrives. This allows bidirectional communication from the start.
Testing