From 9aa972dd83a85cec5da71e8e893eb6e07d5db8ca Mon Sep 17 00:00:00 2001 From: hozan23 Date: Fri, 21 Jun 2024 22:45:17 +0200 Subject: jsonrpc/client: fix subscription error when the subscriber cannot keep up Add a limit for receiving notifications for the subscription. If this limit is exceeded, the client will stop and raise an error. The limit is configurable when building a new client. --- jsonrpc/src/server/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'jsonrpc/src/server/mod.rs') diff --git a/jsonrpc/src/server/mod.rs b/jsonrpc/src/server/mod.rs index 6f539be..00b0fd2 100644 --- a/jsonrpc/src/server/mod.rs +++ b/jsonrpc/src/server/mod.rs @@ -126,7 +126,7 @@ impl Server { method: nt.method, params, }; - // debug!("--> {notification}"); + debug!("--> {notification}"); conn_cloned.send(serde_json::json!(notification)).await?; } } -- cgit v1.2.3