acelyc111 commented on code in PR #2272:
URL:
https://github.com/apache/incubator-pegasus/pull/2272#discussion_r2265130392
##########
src/rpc/asio_net_provider.cpp:
##########
@@ -122,17 +123,17 @@ asio_network_provider::~asio_network_provider()
error_code asio_network_provider::start(rpc_channel channel, int port, bool
client_only)
{
- if (_acceptor != nullptr)
+ if (_acceptor != nullptr) {
return ERR_SERVICE_ALREADY_RUNNING;
+ }
- for (int i = 0; i < FLAGS_io_service_worker_count; i++) {
+ for (auto i = _workers.size(); _workers.size() <
FLAGS_io_service_worker_count; ++i) {
Review Comment:
Why changes to start from _workers.size()? Please add some comments.
##########
src/rpc/asio_net_provider.cpp:
##########
@@ -462,14 +469,14 @@ error_code asio_udp_provider::start(rpc_channel channel,
int port, bool client_o
_hp = ::dsn::host_port::from_address(_address);
LOG_WARNING_IF(!_hp, "'{}' can not be reverse resolved", _address);
- for (int i = 0; i < FLAGS_io_service_worker_count; i++) {
+ for (auto i = _workers.size(); _workers.size() <
FLAGS_io_service_worker_count; ++i) {
Review Comment:
Ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]