face: use move semantics for sockets where possible
Change-Id: I2af595073f862c570c1ce0dcb3717f3d2b9cfd71
Refs: #2613
diff --git a/daemon/face/ethernet-factory.cpp b/daemon/face/ethernet-factory.cpp
index 0126b48..7c2d2f7 100644
--- a/daemon/face/ethernet-factory.cpp
+++ b/daemon/face/ethernet-factory.cpp
@@ -44,8 +44,8 @@
if (face)
return face;
- auto socket = make_shared<boost::asio::posix::stream_descriptor>(ref(getGlobalIoService()));
- face = make_shared<EthernetFace>(socket, interface, address);
+ face = make_shared<EthernetFace>(boost::asio::posix::stream_descriptor(getGlobalIoService()),
+ interface, address);
auto key = std::make_pair(interface.name, address);
face->onFail.connectSingleShot([this, key] (const std::string& reason) {