Catch SendFailedException when replying back in Connection::Receive()
[oweals/minetest.git] / src / connection.cpp
index 89cb7dd0b3dd8aad8298e3e331a441038056ee63..0f09753bd413dbfd8453522b093595adb09c1da9 100644 (file)
@@ -1102,6 +1102,11 @@ u32 Connection::Receive(u16 &peer_id, u8 *data, u32 datasize)
                if(m_socket.WaitData(0) == true)
                        continue;
        }
+       catch(SendFailedException &e)
+       {
+               derr_con<<"Receive(): SendFailedException; peer_id="
+                               <<peer_id<<std::endl;
+       }
        } // for
 }