Catch SendFailedException when replying back in Connection::Receive()
authorPerttu Ahola <celeron55@gmail.com>
Mon, 17 Oct 2011 15:02:26 +0000 (18:02 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Mon, 17 Oct 2011 15:02:26 +0000 (18:02 +0300)
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
 }