Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nullchinchilla committed Mar 10, 2024
1 parent ad21066 commit faa5b97
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions binaries/geph5-exit/src/listen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@ pub async fn listen_main() -> anyhow::Result<()> {

#[tracing::instrument]
async fn broker_loop() -> anyhow::Result<()> {
let my_ip = IpAddr::from_str(
String::from_utf8_lossy(
&reqwest::get("https://checkip.amazonaws.com/")
.await?
.bytes()
.await?,
)
.trim(),
)?;
tracing::info!(
my_ip = display(my_ip),
my_pubkey = display(hex::encode(SIGNING_SECRET.as_bytes())),
"listen information gotten"
);
match &CONFIG_FILE.wait().broker {
Some(broker) => {
let my_ip = IpAddr::from_str(
String::from_utf8_lossy(
&reqwest::get("https://checkip.amazonaws.com/")
.await?
.bytes()
.await?,
)
.trim(),
)?;
tracing::info!(
my_ip = display(my_ip),
my_pubkey = display(hex::encode(SIGNING_SECRET.as_bytes())),
"starting communication with broker"
);
let transport = BrokerRpcTransport::new(&broker.url);
let client = BrokerClient(transport);
loop {
Expand Down

0 comments on commit faa5b97

Please sign in to comment.