builtin/network: Remove client socket event subscriptions in destructor

This commit is contained in:
Perttu Ahola 2014-09-18 17:38:46 +03:00
parent 13544b5060
commit 479968f229

View File

@ -73,6 +73,11 @@ struct Module: public interface::Module, public network::Interface
log_v(MODULE, "network destruct");
if(m_listening_socket->good())
m_server->remove_socket_event(m_listening_socket->fd());
for(auto pair : m_peers){
const Peer &peer = pair.second;
if(peer.socket->good())
m_server->remove_socket_event(peer.socket->fd());
}
}
void init()