You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a server is repeating a packet, the destination is cached in rcache and rcache[dest][1] is the same modem the packet arrived through, the packet should not be repeated. This could be solved by adding a condition in the function sendPacket (on line 119).
The comment on line 37 suggests the time in rcache should be updated when a new packet from that computer is received, but it is not implemented. The function processPacket writes to rcache only if the computer is not cached. The condition on line 189 should be removed, the line rcache[sender] = {localModem,from,computer.uptime()+cfg.rctime}
should be executed for all packets. Therefore when 2 computers periodically communicate, the servers between them never forgot the route. Also, it should be executed before the ack packet is sent. I therefore suggest to move it before the line 172.
Cosmetic issue: the packets contain the vPort entry, but it is not documented in the comment on line 10.
rcache[dest][1]is the same modem the packet arrived through, the packet should not be repeated. This could be solved by adding a condition in the function sendPacket (on line 119).rcache[sender] = {localModem,from,computer.uptime()+cfg.rctime}should be executed for all packets. Therefore when 2 computers periodically communicate, the servers between them never forgot the route. Also, it should be executed before the ack packet is sent. I therefore suggest to move it before the line 172.