mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Use the new algorthm preferentially when getting external IP
This commit is contained in:
parent
ccd34f8d3f
commit
3a1bb4ad0a
@ -89,6 +89,10 @@ _ext_ip = None
|
||||
def get_external_ip():
|
||||
global _ext_ip
|
||||
if _ext_ip is None:
|
||||
from calibre.utils.ip_routing import get_default_route_src_address
|
||||
try:
|
||||
_ext_ip = get_default_route_src_address()
|
||||
except Exception:
|
||||
_ext_ip = _get_external_ip()
|
||||
return _ext_ip
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user