Work around some compile errors for boost::asio::generic::stream_protocol (#6545)

This commit is contained in:
mehrdadn 2019-12-19 12:05:41 -08:00 committed by Philipp Moritz
parent 3bb680a719
commit 634b437543
3 changed files with 14 additions and 3 deletions

View file

@ -24,7 +24,12 @@ ObjectStoreNotificationManager::ObjectStoreNotificationManager(
RAY_ARROW_CHECK_OK(store_client_.Subscribe(&c_socket_));
boost::system::error_code ec;
socket_.assign(local_stream_protocol(), c_socket_, ec);
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
local_stream_protocol sp;
#else // TODO(mehrdadn): HACK: FIXME: This is just to get things compiling!
local_stream_protocol sp(AF_UNIX, 0);
#endif
socket_.assign(sp, c_socket_, ec);
assert(!ec.value());
NotificationWait();
}

View file

@ -51,7 +51,13 @@ Raylet::Raylet(boost::asio::io_service &main_service, const std::string &socket_
node_manager_(main_service, node_manager_config, object_manager_, gcs_client_,
object_directory_),
socket_name_(socket_name),
acceptor_(main_service, local_stream_protocol::endpoint(socket_name)),
acceptor_(main_service, local_stream_protocol::endpoint(
#if defined(BOOST_ASIO_HAS_LOCAL_SOCKETS)
socket_name
#else // TODO(mehrdadn): HACK: FIXME: This is just to get things compiling!
socket_name.data(), socket_name.size()
#endif
)),
socket_(main_service) {
// Start listening for clients.
DoAccept();

View file

@ -76,7 +76,7 @@ class Raylet {
std::string socket_name_;
/// An acceptor for new clients.
local_stream_protocol::acceptor acceptor_;
boost::asio::basic_socket_acceptor<local_stream_protocol> acceptor_;
/// The socket to listen on for new clients.
local_stream_protocol::socket socket_;
};