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

refactor listener #1218

Merged
merged 5 commits into from
Jun 26, 2023
Merged

refactor listener #1218

merged 5 commits into from
Jun 26, 2023

Conversation

huangminghuang
Copy link
Contributor

This PR refactors fc::listener to simply its usage by using lambda instead of inheritance for customization.

@huangminghuang huangminghuang requested a review from heifner May 30, 2023 13:33
@heifner heifner requested a review from greg7mdp May 30, 2023 14:02
@heifner
Copy link
Member

heifner commented May 30, 2023

Thank you @huangminghuang for your personal contribution. It is very much appreciated.

plugins/http_plugin/http_plugin.cpp Outdated Show resolved Hide resolved
libraries/libfc/include/fc/network/listener.hpp Outdated Show resolved Hide resolved
libraries/libfc/include/fc/network/listener.hpp Outdated Show resolved Hide resolved
@greg7mdp

This comment was marked as resolved.

auto endpoints = resolver.resolve(host, port, tcp::resolver::passive, ec);
if (ec) {
fc_elog(logger, "failed to resolve address: ${msg}", ("msg", ec.message()));
throw std::system_error(ec);
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to use this if/fc_elog/throw combo for these over a single EOS_ASSERT line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

EOS_ASSERT is defined in chain, while this function is defined in fc.

@heifner heifner merged commit f870aa3 into main Jun 26, 2023
@heifner heifner deleted the huangminghuang/ipv6 branch June 26, 2023 18:59
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.

4 participants