Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
ws vs wss
Browse files Browse the repository at this point in the history
  • Loading branch information
senia-psm committed Sep 6, 2023
1 parent 54125c5 commit bda43bf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/clients/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,10 @@ impl<C: golem_client::instance::Instance + Send + Sync> WorkerClient for WorkerC
auth: &CloudAuthentication,
) -> Result<(), GolemError> {
let mut url = self.base_url.clone();
url.set_scheme("wss")

let ws_schema = if url.scheme() == "http" { "ws" } else { "wss" };

url.set_scheme(ws_schema)
.map_err(|_| GolemError("Can't set schema.".to_string()))?;
url.path_segments_mut()
.map_err(|_| GolemError("Can't get path.".to_string()))?
Expand Down

0 comments on commit bda43bf

Please sign in to comment.