Skip to content
New issue

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

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

Already on GitHub? # to your account

Reorganize tcp_listener #4515

Merged

Conversation

pwojcikdev
Copy link
Contributor

This is a preparation for future tcp_listener changes. It doesn't change functionality of the class significantly, but moves it to a dedicated file and reduces header coupling.

}

std::size_t nano::transport::tcp_listener::connection_count ()
{
nano::lock_guard<nano::mutex> lock{ mutex };
cleanup ();
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems like an odd place to do cleanup.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it's less than ideal, but this is an intermediate step before doing larger refactoring.

Copy link
Contributor

@clemahieu clemahieu left a comment

Choose a reason for hiding this comment

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

Looks good if the cleanup is going to be called in a more reliable place in future patches.

@pwojcikdev pwojcikdev merged commit 8281cdb into nanocurrency:develop Mar 22, 2024
25 of 27 checks passed
@pwojcikdev pwojcikdev deleted the networking-fixes/tcp-listener-reorg branch March 22, 2024 08:43
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants