diff options
author | Craig Robbins <kde.psych@gmail.com> | 2014-10-26 15:32:49 +1000 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-10-28 13:39:23 -0400 |
commit | 6396712ec488e5113e9367dfa6184f6989c8c360 (patch) | |
tree | 5c291f16f73bf4232ef3a39207dab40c4b3d7878 | |
parent | 9bb6648f2623a35190a9b1a858ccae1d6cc0bc15 (diff) | |
download | minetest-6396712ec488e5113e9367dfa6184f6989c8c360.tar.gz minetest-6396712ec488e5113e9367dfa6184f6989c8c360.tar.bz2 minetest-6396712ec488e5113e9367dfa6184f6989c8c360.zip |
Fix #1733: An unhandled exception occurred: GetPeer: Peer not found (possible timeout)
-rw-r--r-- | src/connection.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/connection.cpp b/src/connection.cpp index ee5b1eb0b..64ef9a50e 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -2322,7 +2322,12 @@ bool ConnectionReceiveThread::checkIncomingBuffers(Channel *channel, SharedBuffer<u8> ConnectionReceiveThread::processPacket(Channel *channel, SharedBuffer<u8> packetdata, u16 peer_id, u8 channelnum, bool reliable) { - PeerHelper peer = m_connection->getPeer(peer_id); + PeerHelper peer = m_connection->getPeerNoEx(peer_id); + + if (!peer) { + errorstream << "Peer not found (possible timeout)" << std::endl; + throw ProcessedSilentlyException("Peer not found (possible timeout)"); + } if(packetdata.getSize() < 1) throw InvalidIncomingDataException("packetdata.getSize() < 1"); |