still a few more changes to lludp Xfer download for lost udp case

0.9.1.0-post-fixes
UbitUmarov 2019-06-12 01:43:32 +01:00
parent 238efad690
commit da90da220e
1 changed files with 10 additions and 9 deletions

View File

@ -233,7 +233,6 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
public void transfersTimeTick(double now)
{
XferDownLoad[] xfrs;
int inow = (int)now;
lock(Transfers)
{
if(Transfers.Count == 0)
@ -244,7 +243,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
}
foreach(XferDownLoad xfr in xfrs)
{
if(xfr.checkTime(inow))
if(xfr.checkTime(now))
{
ulong xfrID = xfr.XferID;
lock(Transfers)
@ -328,7 +327,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
public bool isDeleted = false;
private object myLock = new object();
private int lastACKTimeMS;
private double lastACKTimeMS;
private int LastPacket;
private int lastBytes;
private int lastSentPacket;
@ -389,6 +388,7 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
lastSentPacket = -1;
double now = Util.GetTimeStampMS();
retries = 0;
SendBurst(now);
return;
@ -428,7 +428,6 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
remoteClient.SendXferPacket(XferID, pktid, Data, pkt << 10, pktsize, true);
retries = 0;
lastSentPacket = pkt;
}
@ -445,8 +444,10 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
return true;
packet &= 0x7fffffff;
if(lastAckPacket < packet)
lastAckPacket = (int)packet;
if(lastAckPacket >= packet)
return false;
lastAckPacket = (int)packet;
if(lastAckPacket == LastPacket)
{
@ -463,15 +464,15 @@ namespace OpenSim.Region.CoreModules.Agent.Xfer
}
}
public bool checkTime(int now)
public bool checkTime(double now)
{
if (Monitor.TryEnter(myLock))
{
if (!isDeleted && !inBurst)
{
int timeMS = now - lastACKTimeMS;
double timeMS = now - lastACKTimeMS;
int tout = 5 * remoteClient.PingTimeMS;
double tout = 5 * remoteClient.PingTimeMS;
if(tout > 10000)
tout = 10000;
else if (tout < 500)