network: Replace a fatal_error with just error logging
authorsfan5 <sfan5@live.de>
Thu, 14 May 2020 19:18:26 +0000 (21:18 +0200)
committerGitHub <noreply@github.com>
Thu, 14 May 2020 19:18:26 +0000 (21:18 +0200)
src/network/connectionthreads.cpp

index 1f33d2deddb615d70a6d9ad93cdb645580e89cef..9a6617a1cd9b01f389febb39869a59d23da741de 100644 (file)
@@ -336,11 +336,9 @@ bool ConnectionSendThread::rawSendAsPacket(session_t peer_id, u8 channelnum,
 {
        PeerHelper peer = m_connection->getPeerNoEx(peer_id);
        if (!peer) {
-               LOG(dout_con << m_connection->getDesc()
-                       << " INFO: dropped packet for non existent peer_id: "
-                       << peer_id << std::endl);
-               FATAL_ERROR_IF(!reliable,
-                       "Trying to send raw packet reliable but no peer found!");
+               LOG(errorstream << m_connection->getDesc()
+                       << " dropped " << (reliable ? "reliable " : "")
+                       << "packet for non existent peer_id: " << peer_id << std::endl);
                return false;
        }
        Channel *channel = &(dynamic_cast<UDPPeer *>(&peer)->channels[channelnum]);