Skip to content

Commit 3e94660

Browse files
committed
pool: use per-purpose dedicated relay channels
Add per-purpose dedicated relay channels: 1 for `nostr` messages, 1 for `ping/pong` and 1 for `shutdown/stop`. Signed-off-by: Yuki Kishimoto <[email protected]>
1 parent 6b44a6c commit 3e94660

File tree

3 files changed

+168
-83
lines changed

3 files changed

+168
-83
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727

2828
### Changed
2929

30-
* ffi(sdk): convert `RelayPool::handle_notifications` method to async/future
30+
* pool: use per-purpose dedicated relay channels ([Yuki Kishimoto])
31+
* ffi(sdk): convert `RelayPool::handle_notifications` method to async/future ([Yuki Kishimoto])
3132

3233
### Added
3334

crates/nostr-relay-pool/src/relay/error.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ pub enum Error {
4141
/// Generic timeout
4242
#[error("timeout")]
4343
Timeout,
44+
/// Message response timeout
45+
#[error("Can't send message to the '{channel}' channel")]
46+
CantSendChannelMessage {
47+
/// Name of channel
48+
channel: String,
49+
},
4450
/// Message not sent
4551
#[error("message not sent")]
4652
MessageNotSent,

0 commit comments

Comments
 (0)