projects
/
oweals
/
minetest.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Tune caves
[oweals/minetest.git]
/
src
/
connection.cpp
diff --git
a/src/connection.cpp
b/src/connection.cpp
index 31aa9330751b81afbadc343c6daead026725a5e8..127cabdc51ead787e586cb7069b662fca840370c 100644
(file)
--- 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 */