Don't append ACKs to zerocoded packets. Although this should fine in theory, I'm seeing the viewer ignore or fail to parse ACKs appended to our zerocoded packets. This should cut down on viewer->sim resend traffic
parent
a895de4414
commit
35c82a31db
|
@ -513,6 +513,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
byte flags = buffer.Data[0];
|
byte flags = buffer.Data[0];
|
||||||
bool isResend = (flags & Helpers.MSG_RESENT) != 0;
|
bool isResend = (flags & Helpers.MSG_RESENT) != 0;
|
||||||
bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0;
|
bool isReliable = (flags & Helpers.MSG_RELIABLE) != 0;
|
||||||
|
bool isZerocoded = (flags & Helpers.MSG_ZEROCODED) != 0;
|
||||||
LLUDPClient udpClient = outgoingPacket.Client;
|
LLUDPClient udpClient = outgoingPacket.Client;
|
||||||
|
|
||||||
if (!udpClient.IsConnected)
|
if (!udpClient.IsConnected)
|
||||||
|
@ -522,6 +523,9 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
int dataLength = buffer.DataLength;
|
int dataLength = buffer.DataLength;
|
||||||
|
|
||||||
|
// NOTE: I'm seeing problems with some viewers when ACKs are appended to zerocoded packets so I've disabled that here
|
||||||
|
if (!isZerocoded)
|
||||||
|
{
|
||||||
// Keep appending ACKs until there is no room left in the buffer or there are
|
// Keep appending ACKs until there is no room left in the buffer or there are
|
||||||
// no more ACKs to append
|
// no more ACKs to append
|
||||||
uint ackCount = 0;
|
uint ackCount = 0;
|
||||||
|
@ -540,6 +544,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
// Set the appended ACKs flag on this packet
|
// Set the appended ACKs flag on this packet
|
||||||
buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS);
|
buffer.Data[0] = (byte)(buffer.Data[0] | Helpers.MSG_APPENDED_ACKS);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buffer.DataLength = dataLength;
|
buffer.DataLength = dataLength;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue