Bug Fix: Failed to connect lidar when multi adapter presented with fi… #18

Merged
jingweiz2017 merged 2 commits from master into master 2019-10-31 08:57:39 +01:00

2 Commits

Author SHA1 Message Date
jingweiz2017 b261798200 Update network_util.cpp
Adjust the indentation.
2019-10-25 10:49:02 +08:00
Jingwei Zhang 74f63da255 Bug Fix: Failed to connect lidar when multi adapter presented with first one disconnected
Bug Description:
When you have more than one network adater on your compter, this part of the code is supposed to find one that is connecting and working fine and obtain its ip address for handshaking request.
However, it failed to do so when the first network adapter is not connected. Thus GetAdapterState returns false and we stopped trying on the other adapters.

Fix:
Try each adapter, if it is not working, we try the next one. Either we find one and we move onto the following process or we find none and quit.
2019-10-25 10:16:11 +08:00