Skip to content

Commit

Permalink
fix: ip parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
0xNineteen committed Dec 17, 2024
1 parent dfa7e33 commit 0f37b70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/cmd.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1238,8 +1238,8 @@ const AppBase = struct {
const my_shred_version = echo_data.shred_version orelse 0;
logger.info().logf("my shred version: {d}", .{my_shred_version});

const my_ip = config.current.gossip.getHost() catch
echo_data.ip orelse IpAddr.newIpv4(127, 0, 0, 1);
const config_host = config.current.gossip.getHost() catch null;
const my_ip = config_host orelse echo_data.ip orelse IpAddr.newIpv4(127, 0, 0, 1);
logger.info().logf("my ip: {any}", .{my_ip});

const my_port = config.current.gossip.port;
Expand Down

0 comments on commit 0f37b70

Please sign in to comment.