mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-14 12:11:09 +00:00
implement session handling for unsubscribe in subxt-client (#242)
* implement session handling for unsubscribe in subxt-client Signed-off-by: Gregory Hill <gregorydhill@outlook.com> * update jsonrpsee to `v0.2.0-alpha.2` Closes #241 * use new jsonrpsee request message types in subxt client Signed-off-by: Gregory Hill <gregorydhill@outlook.com> Co-authored-by: Niklas Adolfsson <niklasadolfsson1@gmail.com>
This commit is contained in:
+2
-3
@@ -195,9 +195,8 @@ impl<T: Runtime> ClientBuilder<T> {
|
||||
let url = self.url.as_deref().unwrap_or("ws://127.0.0.1:9944");
|
||||
if url.starts_with("ws://") || url.starts_with("wss://") {
|
||||
let mut config = WsConfig::with_url(&url);
|
||||
// max notifs per subscription capacity.
|
||||
config.max_subscription_capacity = 4096;
|
||||
RpcClient::WebSocket(WsClient::new(WsConfig::with_url(&url)).await?)
|
||||
config.max_notifs_per_subscription = 4096;
|
||||
RpcClient::WebSocket(WsClient::new(config).await?)
|
||||
} else {
|
||||
let client = HttpClient::new(url, HttpConfig::default())?;
|
||||
RpcClient::Http(Arc::new(client))
|
||||
|
||||
Reference in New Issue
Block a user