diff --git a/examples/tcp-large-transfer.cc b/examples/tcp-large-transfer.cc index 8c7b16c5d..76c57f642 100644 --- a/examples/tcp-large-transfer.cc +++ b/examples/tcp-large-transfer.cc @@ -206,7 +206,12 @@ void WriteUntilBufferFull (Ptr localSocket, uint32_t nBytes) char m = toascii (97 + i % 26); data[i] = m; } - localSocket->Send (data, curSize); + uint32_t amountSent = localSocket->Send (data, curSize); + if(amountSent < curSize) + { + std::cout << "Socket blocking, returning" << std::endl; + return; + } nBytes -= curSize; } }