HybridThingsLab / robodada

http://hybridthings.com/
MIT License
8 stars 1 forks source link

Robot discovery fails to use correct interface in some networks #44

Open andreas-kraus opened 3 years ago

andreas-kraus commented 3 years ago

The automatic robot discovery only works correctly, if the ipv4 network is first in the list of networks. The code that should have prevented this has some issues. I was able to fix it for my network setup, but I'm not sure if this will fix it for everyone.

In the function Serverland/controller/controller.js -> searchRobots(), the "alias" variable is not being incremented when skipping ipv6 and local networks, it is only ever increased at the end of the function and never get bigger that 1. This causes the "searchalias" to be set incorrectly, which in turn causes the wrong network to be selected for searching. I think it's possibly fixable by incrementing the "alias" whenever a network is skipped.

HybridThings commented 3 years ago

Looks good now. But let's keep issue open and double check after first release