async: change set_socket_option caller

Signed-off-by: Haomai Wang <haomai@xsky.com>
This commit is contained in:
Haomai Wang 2016-01-03 17:54:36 +08:00
parent 2d1f7aaf40
commit f6879fea78
3 changed files with 4 additions and 3 deletions

View File

@ -1331,7 +1331,7 @@ ssize_t AsyncConnection::_process_connection()
if (net.set_nonblock(sd) < 0)
goto fail;
net.set_socket_options(sd);
net.set_socket_options(sd, async_msgr->cct->_conf->ms_tcp_nodelay, async_msgr->cct->_conf->ms_tcp_rcvbuf);
net.set_priority(sd, async_msgr->get_socket_priority());
bl.append(CEPH_BANNER, strlen(CEPH_BANNER));

View File

@ -105,7 +105,7 @@ int Processor::bind(const entity_addr_t &bind_addr, const set<int>& avoid_ports)
return r;
}
net.set_close_on_exec(listen_sd);
net.set_socket_options(listen_sd);
net.set_socket_options(listen_sd, msgr->cct->_conf->ms_tcp_nodelay, msgr->cct->_conf->ms_tcp_rcvbuf);
// use whatever user specified (if anything)
entity_addr_t listen_addr = bind_addr;

View File

@ -161,7 +161,8 @@ int NetHandler::generic_connect(const entity_addr_t& addr, bool nonblock)
}
}
set_socket_options(s);
set_socket_options(s, cct->_conf->ms_tcp_nodelay, cct->_conf->ms_tcp_rcvbuf);
ret = ::connect(s, addr.get_sockaddr(), addr.get_sockaddr_len());
if (ret < 0) {