+ int interval;
+
+ if(n->status.udp_confirmed && n->udpprobes >= 0) {
+ // UDP confirmed and no lost probes, default interval
+ interval = 10;
+ } else if(n->udpprobes <= -15) {
+ // Many probes lost in a row, slow probing interval
+ n->udpprobes = -15;
+ interval = 10;
+ } else {
+ // Fast probing if we don't know the state of UDP connectivity yet
+ interval = 2;
+ }