Skip to content

Commit

Permalink
fix(volo-thrift): server rpcinfo.caller may be None
Browse files Browse the repository at this point in the history
  • Loading branch information
PureWhiteWu committed Aug 22, 2023
1 parent 556c463 commit cdc99ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion volo-thrift/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "volo-thrift"
version = "0.7.0"
version = "0.7.1"
edition.workspace = true
homepage.workspace = true
repository.workspace = true
Expand Down
2 changes: 2 additions & 0 deletions volo-thrift/src/transport/pingpong/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ pub async fn serve<Svc, Req, Resp, E, D, SP>(
caller.set_address(peer_addr.clone());
cx.rpc_info.caller = Some(caller);
}
} else if cx.rpc_info.caller().is_none() {
cx.rpc_info.caller = Some(Endpoint::new("-".into()));
}

let msg = tokio::select! {
Expand Down

0 comments on commit cdc99ae

Please sign in to comment.