Opened 2 years ago
Closed 2 years ago
#2441 closed defect (fixed)
Initial SSU Peer Test does not run
Reported by: | Zlatin Balevsky | Owned by: | zzz |
---|---|---|---|
Priority: | minor | Milestone: | 0.9.39 |
Component: | router/transport | Version: | 0.9.38 |
Keywords: | ssu | Cc: | |
Parent Tickets: | Sensitive: | no |
Description
In router/java/src/net/i2p/router/transport/udp/UDPTransport.java there is the following code:
_testEvent.setIsAlive(true); // this queues it for 3-6 minutes in the future... _testEvent.reschedule(10*1000); // lets requeue it for Real Soon
However, when Real Soon arrives (10 * 1000ms) later no test for that specific protocol is performed. This is because when doing the initial binding to interfaces the time of the last test is set - consider the following stack trace:
17/02/19 15:58:32 DEBUG [JobQueue 1/1] er.transport.udp.PeerTestEvent: PTE.setLastTested() - v6? true java.lang.Exception at net.i2p.router.transport.udp.PeerTestEvent.setLastTested(PeerTestEvent.java:138) at net.i2p.router.transport.udp.UDPTransport.locked_setReachabilityStatus(UDPTransport.java:2925) at net.i2p.router.transport.udp.UDPTransport.setReachabilityStatus(UDPTransport.java:2914) at net.i2p.router.transport.udp.UDPTransport.startup(UDPTransport.java:553) at net.i2p.router.transport.udp.UDPTransport.startListening(UDPTransport.java:2027) at net.i2p.router.transport.TransportManager.startListening(TransportManager.java:354) at net.i2p.router.transport.CommSystemFacadeImpl.startup(CommSystemFacadeImpl.java:63)
So when the PeerTestEvent kicks off 10 seconds later it finds out that 10*1000 < MIN_TEST_FREQUENCY (which is 45*1000) and does not test the protocol that was bound.
Note that if both IPv4 and IPv6 addresses are present, whatever the other protocol is will be tested.
Subtickets
Change History (3)
comment:1 Changed 2 years ago by
Milestone: | undecided → 0.9.39 |
---|---|
Status: | new → accepted |
comment:2 Changed 2 years ago by
comment:3 Changed 2 years ago by
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Modified from the patch above to ensure that force always forces, and simplify the code.
In aed5aa391dbf4e688ca2180565dda87a80510ae3 to be 0.9.38-11
how about something like this (untested) ?