mirror of
https://github.com/SFML/SFML.git
synced 2025-02-07 17:08:02 +08:00
Fixed sockets not closing before being moved into
This commit is contained in:
parent
7e927c488b
commit
9a4929c844
@ -65,6 +65,8 @@ Socket& Socket::operator=(Socket&& socket) noexcept
|
|||||||
if (&socket == this)
|
if (&socket == this)
|
||||||
return *this;
|
return *this;
|
||||||
|
|
||||||
|
close();
|
||||||
|
|
||||||
m_type = socket.m_type;
|
m_type = socket.m_type;
|
||||||
m_socket = std::exchange(socket.m_socket, priv::SocketImpl::invalidSocket());
|
m_socket = std::exchange(socket.m_socket, priv::SocketImpl::invalidSocket());
|
||||||
m_isBlocking = socket.m_isBlocking;
|
m_isBlocking = socket.m_isBlocking;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user