diff --git a/brotab/env.py b/brotab/env.py index a9ac7b6..634aeaf 100644 --- a/brotab/env.py +++ b/brotab/env.py @@ -17,11 +17,11 @@ def http_iface(): def min_http_port(): - return environ.get('MIN_HTTP_PORT', DEFAULT_MIN_HTTP_PORT) + return int(environ.get('MIN_HTTP_PORT', DEFAULT_MIN_HTTP_PORT)) def max_http_port(): - return environ.get('MAX_HTTP_PORT', DEFAULT_MAX_HTTP_PORT) + return int(environ.get('MAX_HTTP_PORT', DEFAULT_MAX_HTTP_PORT)) def load_dotenv(filename=None): diff --git a/brotab/inout.py b/brotab/inout.py index 92d923d..49e1568 100644 --- a/brotab/inout.py +++ b/brotab/inout.py @@ -18,7 +18,7 @@ def get_mediator_ports() -> Iterable: - return range(min_http_port(), max_http_port()) + return range(min_http_port(), max_http_port() + 1) def get_available_tcp_port(start=1025, end=65536, host='127.0.0.1'):