Skip to content

Commit

Permalink
Address issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Anna Khanova committed Nov 29, 2023
1 parent 98dc87c commit 39bc3d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions proxy/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,9 @@ pub async fn task_main(
info!("accepted postgres client connection");

let mut socket = WithClientIp::new(socket);
let mut peer_addr = peer_addr;
if let Some(ip) = socket.wait_for_addr().await? {
peer_addr = ip;
tracing::Span::current().record("peer_addr", &tracing::field::display(ip));
} else if config.require_client_ip {
bail!("missing required client IP");
Expand Down

0 comments on commit 39bc3d1

Please sign in to comment.