crimson/net/Socket: adapt to seastar v2 api

variadic futures is deprecated in seastar api v2, so let's use the new
variant.

Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
Kefu Chai 2019-08-28 00:50:33 +08:00
parent 9d0ff5b3b9
commit 2f522b22de

View File

@ -62,8 +62,8 @@ class Socket
static seastar::future<SocketFRef, entity_addr_t>
accept(seastar::server_socket& listener) {
return listener.accept().then([] (seastar::connected_socket socket,
seastar::socket_address paddr) {
return listener.accept().then([] (seastar::accept_result accept_result) {
auto [socket, paddr] = std::move(accept_result);
entity_addr_t peer_addr;
peer_addr.set_sockaddr(&paddr.as_posix_sockaddr());
peer_addr.set_type(entity_addr_t::TYPE_ANY);