Skip to content

Commit

Permalink
chore: Prefix repeater address with ws:// if it doesn't have it
Browse files Browse the repository at this point in the history
Otherwise we'll throw on ambiguous protocol def
  • Loading branch information
qdot committed Sep 1, 2024
1 parent dd83bcc commit 6bb0367
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/repeater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ impl ButtplugRepeater {
stream_result = listener.accept() => {
match stream_result {
Ok((stream, _)) => {
let remote_address = self.remote_address.clone();
let mut remote_address = self.remote_address.clone();
if !remote_address.starts_with("ws://") {
remote_address.insert_str(0, "ws://");
}
tokio::spawn(ButtplugRepeater::accept_connection(remote_address, stream));
},
Err(e) => {
Expand Down

0 comments on commit 6bb0367

Please sign in to comment.