Reduce the delay for reading from dummy interfaces during rhizome transfers

This commit is contained in:
Jeremy Lakeman 2013-06-19 16:52:01 +09:30
parent e72597243f
commit 0736e6b9e8

View File

@ -664,14 +664,14 @@ static void interface_read_file(struct overlay_interface *interface)
if (interface->recv_offset>=length){
if (interface->alarm.alarm == -1 || now + 5 < interface->alarm.alarm){
interface->alarm.alarm = now + 5;
interface->alarm.deadline = interface->alarm.alarm + 10000;
interface->alarm.deadline = interface->alarm.alarm + 500;
}
}else{
/* keep reading new packets as fast as possible,
but don't completely prevent other high priority alarms */
if (interface->alarm.alarm == -1 || now < interface->alarm.alarm){
interface->alarm.alarm = now;
interface->alarm.deadline = interface->alarm.alarm + (new_packets > 10?50:10000);
interface->alarm.deadline = interface->alarm.alarm + 100;
}
}
OUT();