Skip to content

Commit

Permalink
Minor improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
crodas committed Dec 5, 2024
1 parent 8b3ff74 commit 47e0d58
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions crates/cdk-axum/src/ws/subscribe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,13 @@ pub(crate) async fn handle(
return Err(WsError::InvalidParams);
}

let mut subscription = if let Ok(subscription) = context
let mut subscription = context
.state
.mint
.pubsub_manager
.try_subscribe(params)
.await
{
subscription
} else {
return Err(WsError::ParseError);
};
.map_err(|_| WsError::InternalError)?;

let publisher = context.publisher.clone();
context.subscriptions.insert(
Expand Down

0 comments on commit 47e0d58

Please sign in to comment.