-
Notifications
You must be signed in to change notification settings - Fork 73
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
refactor listener #1218
Conversation
Thank you @huangminghuang for your personal contribution. It is very much appreciated. |
This comment was marked as resolved.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
This PR refactors
fc::listener
to simply its usage by using lambda instead of inheritance for customization.