Skip to content

Commit

Permalink
Improve discoverability when --port=0 is used (#1890)
Browse files Browse the repository at this point in the history
  • Loading branch information
robbtraister authored Mar 9, 2023
1 parent bb1b50f commit 9b0a8f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uvicorn/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def bind_socket(self) -> socket.socket:
+ " (Press CTRL+C to quit)"
)
protocol_name = "https" if self.is_ssl else "http"
logger_args = [protocol_name, self.host, self.port]
logger_args = [protocol_name, self.host, sock.getsockname()[1]]
logger.info(message, *logger_args, extra={"color_message": color_message})
sock.set_inheritable(True)
return sock
Expand Down

0 comments on commit 9b0a8f6

Please sign in to comment.