diff options
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | src/ls_client.rs | 5 |
2 files changed, 6 insertions, 1 deletions
@@ -1,6 +1,6 @@ [package] name = "lightstreamer-client" -version = "0.1.5" +version = "0.1.6" edition = "2021" authors = ["Daniel López Azaña <daniloaz@gmail.com>"] description = "A Rust client for Lightstreamer, designed to facilitate real-time communication with Lightstreamer servers." diff --git a/src/ls_client.rs b/src/ls_client.rs index 95cdfba..cfd365f 100644 --- a/src/ls_client.rs +++ b/src/ls_client.rs @@ -443,6 +443,7 @@ impl LightstreamerClient { // Prepare the subscription request. // let mut params: Vec<(&str, &str)> = vec![ + ("LS_data_adapter", &ls_data_adapter), ("LS_reqId", &ls_req_id), ("LS_op", "add"), ("LS_subId", &ls_sub_id), @@ -451,6 +452,10 @@ impl LightstreamerClient { ("LS_schema", &ls_schema), ("LS_ack", "false"), ]; + // Remove the data adapter parameter if not specified. + if ls_data_adapter == "" { + params.remove(0); + } if ls_snapshot != "" { params.push(("LS_snapshot", &ls_snapshot)); } |