Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyth-stream"
version = "0.1.7"
version = "0.1.8"
edition = "2021"

[lib]
Expand Down
5 changes: 4 additions & 1 deletion src/bin/websocket_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ async fn handle_client_message(addr: &str, text: &str, clients: &Clients) -> Res
async fn handle_subscribe(addr: &str, ids: Vec<String>, clients: &Clients) -> ServerResponse {
let mut clients = clients.lock().await;
if let Some((subscriptions, _)) = clients.get_mut(addr) {
for hex_id in ids {
for mut hex_id in ids {
if !hex_id.starts_with("0x") {
hex_id = format!("0x{}", hex_id);
}
subscriptions.insert(hex_id.clone());
debug!("Client {} subscribed to feed ID: {}", addr, hex_id);
}
Expand Down