diff options
Diffstat (limited to 'src/connection.cpp')
-rw-r--r-- | src/connection.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/connection.cpp b/src/connection.cpp index 31aa93307..127cabdc5 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -537,6 +537,14 @@ Connection::Connection(u32 protocol_id, u32 max_packet_size, float timeout, Connection::~Connection() { stop(); + // Delete peers + for(core::map<u16, Peer*>::Iterator + j = m_peers.getIterator(); + j.atEnd() == false; j++) + { + Peer *peer = j.getNode()->getValue(); + delete peer; + } } /* Internal stuff */ |