Skip to content

Commit

Permalink
Fix comfyui tool https (#11859)
Browse files Browse the repository at this point in the history
  • Loading branch information
shaxiaozz authored Dec 20, 2024
1 parent 9d93ad1 commit 95a7e50
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ def queue_prompt(self, client_id: str, prompt: dict) -> str:
def open_websocket_connection(self) -> tuple[WebSocket, str]:
client_id = str(uuid.uuid4())
ws = WebSocket()
ws_address = f"ws://{self.base_url.authority}/ws?clientId={client_id}"
ws_protocol = "ws"
if self.base_url.scheme == "https":
ws_protocol = "wss"
ws_address = f"{ws_protocol}://{self.base_url.authority}/ws?clientId={client_id}"
ws.connect(ws_address)
return ws, client_id

Expand Down

0 comments on commit 95a7e50

Please sign in to comment.