Skip to content

Commit

Permalink
[ISSUE #2372]👻Channel add send method🚀 (#2373)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm authored Jan 23, 2025
1 parent a5f472b commit 7711374
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rocketmq-remoting/src/net/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,15 @@ impl Channel {
}
Ok(())
}

pub async fn send(&mut self, request: RemotingCommand) -> Result<()> {
let request = request.mark_oneway_rpc();
if let Err(err) = self.tx.send((request, None, None)).await {
error!("send request failed: {}", err);
return Err(ChannelSendRequestFailed(err.to_string()));
}
Ok(())
}
}

#[cfg(test)]
Expand Down

0 comments on commit 7711374

Please # to comment.