Skip to content

Commit

Permalink
cleanup: Make TCP connection failures a warning instead of error.
Browse files Browse the repository at this point in the history
It's not really bad, unless all connections fail. This is currently
erroring on FreeBSD tests, making them fail needlessly.
  • Loading branch information
iphydf committed Dec 27, 2023
1 parent ef4897a commit 9e8078b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion other/bootstrap_daemon/docker/tox-bootstrapd.sha256
Original file line number Diff line number Diff line change
@@ -1 +1 @@
793cce1916b0d406b8e337d1a5243dc71b07727974cc83a3ef39b7af6cbf6cdb /usr/local/bin/tox-bootstrapd
f32eeda23d129a2ca4c75ecfda9fc351f2cacda05dfbb08c05e8923ed8b496b2 /usr/local/bin/tox-bootstrapd
4 changes: 2 additions & 2 deletions toxcore/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -1748,8 +1748,8 @@ bool net_connect(const Memory *mem, const Logger *log, Socket sock, const IP_Por
// Non-blocking socket: "Operation in progress" means it's connecting.
if (!should_ignore_connect_error(error)) {
char *net_strerror = net_new_strerror(error);
LOGGER_ERROR(log, "failed to connect to %s:%d: %d (%s)",
net_ip_ntoa(&ip_port->ip, &ip_str), net_ntohs(ip_port->port), error, net_strerror);
LOGGER_WARNING(log, "failed to connect to %s:%d: %d (%s)",

Check warning on line 1751 in toxcore/network.c

View check run for this annotation

Codecov / codecov/patch

toxcore/network.c#L1751

Added line #L1751 was not covered by tests
net_ip_ntoa(&ip_port->ip, &ip_str), net_ntohs(ip_port->port), error, net_strerror);
net_kill_strerror(net_strerror);
return false;
}
Expand Down

0 comments on commit 9e8078b

Please sign in to comment.