parent
252bcabbea
commit
b2c33c1373
|
@ -4,7 +4,7 @@ from __future__ import annotations
|
||||||
import asyncio
|
import asyncio
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
import enum
|
import enum
|
||||||
from functools import wraps
|
from functools import lru_cache, wraps
|
||||||
import random
|
import random
|
||||||
import re
|
import re
|
||||||
import socket
|
import socket
|
||||||
|
@ -129,6 +129,7 @@ def ensure_unique_string(
|
||||||
|
|
||||||
|
|
||||||
# Taken from: http://stackoverflow.com/a/11735897
|
# Taken from: http://stackoverflow.com/a/11735897
|
||||||
|
@lru_cache(maxsize=None)
|
||||||
def get_local_ip() -> str:
|
def get_local_ip() -> str:
|
||||||
"""Try to determine the local IP address of the machine."""
|
"""Try to determine the local IP address of the machine."""
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue