1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-08-10 21:52:01 +02:00

If no link found, return max possible value

This commit is contained in:
Milos Gajdos
2019-10-23 16:48:47 +01:00
parent f4f178c130
commit b3d4a7f740

View File

@@ -4,6 +4,7 @@ import (
"errors"
"fmt"
"hash/fnv"
"math"
"sync"
"time"
@@ -675,7 +676,7 @@ func (n *network) getRouteMetric(router string, gateway string) int64 {
}
return (delay * length * int64(hops)) / 10e9
}
return 0
return math.MaxInt64
}
// getHopCount queries network graph and returns hop count for given router