Skip to content

Conversation

@fortuna
Copy link
Collaborator

@fortuna fortuna commented Feb 7, 2025

No description provided.

@fortuna fortuna requested review from jyyi1 and sbruens February 7, 2025 23:19
@fortuna fortuna requested a review from a team as a code owner February 7, 2025 23:19
Copy link
Contributor

@jyyi1 jyyi1 left a comment

Choose a reason for hiding this comment

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

Sounds like a workaround, maybe have a todo comment mentioning the ideal fix?

func (h *udpHandler) ReceiveTo(tunConn core.UDPConn, data []byte, destAddr *net.UDPAddr) (err error) {
defer func() {
if r := recover(); r != nil {
slog.Error("Panic in UDP handler", "err", r)
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this log be collected by Sentry?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it might.

@fortuna
Copy link
Collaborator Author

fortuna commented Feb 7, 2025

Humm... I'm not 100% convinced about this PR. If we recover from panic, the proxyConn may be in a corrupted state, so future Writes will likely panic as well. Possibly the reads and close too.

We could try to discard them, but Close is needed for cleanup.

Needs more thought.

@fortuna fortuna marked this pull request as draft April 8, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants