Skip to content

Conversation

cottsay
Copy link
Owner

@cottsay cottsay commented Jan 20, 2025

If a proxy client sends a TCP_OPEN message while the proxy already has an open connection, the proxy will leak the handle to the original connection to process the new one.

After testing this scenario on the Java implementation, it appears to send a TCP_CLOSE message to the client for the original connection and then immediately open a new connection. It's hard to tell if this is what the EchoLink client wants us to do, but taking the same behavior as the Java proxy is certainly better than leaking the handle like we were doing, so that's what this change does.

If a proxy client sends a TCP_OPEN message while the proxy already has
an open connection, the proxy will leak the handle to the original
connection to process the new one.

After testing this scenario on the Java implementation, it appears to
send a TCP_CLOSE message to the client for the original connection and
then immediately open a new connection. It's hard to tell if this is
what the EchoLink client wants us to do, but taking the same behavior as
the Java proxy is certainly better than leaking the handle like we were
doing, so that's what this change does.
@cottsay cottsay added the bug label Jan 20, 2025
@cottsay cottsay self-assigned this Jan 20, 2025
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 20 lines in your changes missing coverage. Please review.

Project coverage is 51.47%. Comparing base (5e41d0e) to head (f3dbee8).

Files with missing lines Patch % Lines
src/proxy_conn.c 0.00% 20 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
- Coverage   51.67%   51.47%   -0.20%     
==========================================
  Files          22       22              
  Lines        2901     2908       +7     
==========================================
- Hits         1499     1497       -2     
- Misses       1402     1411       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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