Fixed sockets not closing before being moved into

This commit is contained in:
André Polomat 2023-10-28 22:10:49 -04:00 committed by Chris Thrasher
parent 7e927c488b
commit 9a4929c844

View File

@ -65,6 +65,8 @@ Socket& Socket::operator=(Socket&& socket) noexcept
if (&socket == this)
return *this;
close();
m_type = socket.m_type;
m_socket = std::exchange(socket.m_socket, priv::SocketImpl::invalidSocket());
m_isBlocking = socket.m_isBlocking;