From: Craig Robbins Date: Sun, 26 Oct 2014 05:32:49 +0000 (+1000) Subject: Fix #1733: An unhandled exception occurred: GetPeer: Peer not found (possible timeout) X-Git-Tag: 0.4.11~209 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6396712ec488e5113e9367dfa6184f6989c8c360;p=oweals%2Fminetest.git Fix #1733: An unhandled exception occurred: GetPeer: Peer not found (possible timeout) --- 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 ConnectionReceiveThread::processPacket(Channel *channel, SharedBuffer 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");