Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tcpreuse: error on using tcpreuse with pnet #3129

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sukunrt
Copy link
Member

@sukunrt sukunrt commented Dec 30, 2024

Sharing the TCP Listen socket with WebSocket doesn't work with pnet.

Sharing the TCP Listen socket with WebSocket doesn't work with pnet.
@sukunrt sukunrt requested a review from aschmahmann December 30, 2024 15:47
Copy link
Collaborator

@aschmahmann aschmahmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some questions/comments, but generally LGTM

Comment on lines +484 to +486
if len(cfg.PSK) > 0 && cfg.ShareTCPListener {
return nil, errors.New("cannot use shared TCP and WebSocket listener with PSK")
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, although technically the shared listener feature isn't coupled to having TCP + WS since you can currently enable it with just TCP (albeit at no real benefit) and down the road it might be configurable with HTTP as well.

Comment on lines +454 to +455
defer func() {
if createErr != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this cover everything not already stopped by fx and how does this play with the closing that happens when autonat fails to start?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TCP connection multiplexing (tcpreuse package) doesn't work with pnet
2 participants