actually call sendReliablePacket for write of reliable

This commit is contained in:
Stephen Birarda 2015-07-30 17:12:42 -07:00
parent d340515ab3
commit 0f1d1a16a7
2 changed files with 4 additions and 2 deletions

View file

@ -85,7 +85,7 @@ qint64 Socket::writePacket(const Packet& packet, const HifiSockAddr& sockAddr) {
qint64 Socket::writePacket(std::unique_ptr<Packet> packet, const HifiSockAddr& sockAddr) {
if (packet->isReliable()) {
auto connection = findOrCreateConnection(sockAddr);
findOrCreateConnection(sockAddr)->sendReliablePacket(move(packet));
return 0;
}

View file

@ -143,7 +143,7 @@ void UDTTest::parseArguments() {
}
void UDTTest::sendInitialPackets() {
static const int NUM_INITIAL_PACKETS = 500;
static const int NUM_INITIAL_PACKETS = 10;
int numPackets = std::max(NUM_INITIAL_PACKETS, _maxSendPackets);
@ -187,6 +187,8 @@ void UDTTest::sendPacket() {
auto newPacket = udt::Packet::create(packetPayloadSize, _sendReliable);
_totalQueuedBytes += newPacket->getDataSize();
// queue or send this packet by calling write packet on the socket for our target
if (_sendReliable) {
_socket.writePacket(std::move(newPacket), _target);