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

Apply RAII to UnixSocket #11817

Closed
wants to merge 1 commit into from

Conversation

JosiahWI
Copy link
Contributor

@JosiahWI JosiahWI commented Oct 12, 2024

This deletes the UnixSocket copy constructors and adds move constructors and a destructor. The NetAccept and NetAcceptEvent classes now store shared pointers to their server instances because of this change.

Todo:

  • Implement a way to release the file descriptor from a UnixSocket, necessary because SSL takes ownership of it.
  • Close the socket in the UnixSocket destructor if it is still valid.

@JosiahWI JosiahWI added this to the 10.1.0 milestone Oct 12, 2024
@JosiahWI JosiahWI self-assigned this Oct 12, 2024
@JosiahWI JosiahWI force-pushed the refactor/unix-socket-raii branch 8 times, most recently from e0cd0c2 to 900418d Compare October 12, 2024 23:09
This deletes the `UnixSocket` copy constructors and adds move constructors and
a destructor. The `NetAccept` and `NetAcceptEvent` classes now store shared
pointers to their server instances because of this change.
@JosiahWI JosiahWI force-pushed the refactor/unix-socket-raii branch from 900418d to ed97eb6 Compare October 14, 2024 11:52
@JosiahWI
Copy link
Contributor Author

The last run of the AuTest remap_acl failed:

       Test : Checking that ReturnCode == 0 - Failed
          Reason: Returned Value 70 != 0
       file /tmp/sandbox/remap_acl/ts-140/log/diags.log : Diags log file diags.log should not contain errors - Passed
          Reason: Contents of /tmp/sandbox/remap_acl/ts-140/log/diags.log excludes expression
       file /tmp/sandbox/remap_acl/ts-140/log/diags.log : Diags log file diags.log should not contain errors - Failed
          Reason: Contents of /tmp/sandbox/remap_acl/ts-140/log/diags.log contains expression: "FATAL:"
             Details:
               [Oct 14 12:24:49.592] traffic_server FATAL: Could not bind or listen to port 44683, mptcp enabled: 0 (error: 98) Address already in use -1 : 37
               ```

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. Marking it stale to flag it for further consideration by the community.

@github-actions github-actions bot added the Stale label Jan 13, 2025
@github-actions github-actions bot closed this Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant