Skip to content

Commit 66dc513

Browse files
Fingers crossed
1 parent b0a11fc commit 66dc513

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/routes/relayer/websockets.rs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,15 @@ pub async fn handle_ws_conn(
8080
cleanup_tx.send(Command::Kill).unwrap();
8181
break 'reconnect;
8282
}
83-
let request = ClientRequestBuilder::new("http://localhost:3070/v1".parse().unwrap())
83+
let request = ClientRequestBuilder::new("ws://localhost:3070/v1".parse().unwrap())
8484
.with_header("Target-Service-Id", String::from(path.id()));
8585

86-
let (node_socket, _res) = connect_async_tls_with_config(request, None, false, None)
87-
.await
88-
.unwrap();
86+
let Ok((node_socket, _res)) =
87+
connect_async_tls_with_config(request, None, false, None).await
88+
else {
89+
tracing::error!("Failed to connect to websocket");
90+
break 'reconnect;
91+
};
8992

9093
let (mut node_tx, mut node_rv) = node_socket.split();
9194

0 commit comments

Comments
 (0)