Fix early socket close in tcp-large-transfer example

This commit is contained in:
Tommaso Pecorella
2020-02-28 08:11:57 +00:00
parent 8d4297f245
commit 8d95066b58

View File

@@ -212,5 +212,8 @@ void WriteUntilBufferFull (Ptr<Socket> localSocket, uint32_t txSpace)
}
currentTxBytes += amountSent;
}
localSocket->Close ();
if (currentTxBytes >= totalTxBytes)
{
localSocket->Close ();
}
}