[EOSIO/eos] net_plugin::plugin_startup gives more information when it attempts to… (#5179)

If net_plugin::plugin_startup fails to bind, the error message in the log is mysterious; all you know is that something, somewhere failed to bind to a port.

After the patch, you get:

2018-08-12T16:09:51.860 thread-0 net_plugin.cpp:3015 plugin_startup ] net_plugin::plugin_startup failed to bind to port 9876
2018-08-12T16:09:51.878 thread-0 main.cpp:145 main ] std::exception

Before the patch, you get no indication of what code might be causing the problem:

2018-08-12T16:19:45.887 thread-0 http_plugin.cpp:401 plugin_startup ] start listening for http requests
2018-08-12T16:19:45.909 thread-0 main.cpp:131 main ] Throw location unknown (consider using BOOST_THROW_EXCEPTION)
Dynamic exception type: boost::exception_detail::clone_impl >
std::exception::what: bind: Address already in use
Helps people diagnose problems with issues like #3999.
You can view, comment on, or merge this pull request online at:


— Commit Summary —

* net_plugin::plugin_startup gives more information when it attempts to bind to a port

— File Changes —

M plugins/net_plugin/net_plugin.cpp (8)

— Patch Links —


Добавить комментарий