[fix] change confusing error message (#32965)

This PR tries to correct a confusing message. For my little
understanding, it seems that if the code reaches that level, it is not
correct to say that setting TCP_USER_TIMEOUT failed, but actually it
succeeded (setsockopt returned 0) but is different to the previous value
option.

I haven't found the `gpr_log` description, so I hope the PR is correct.

---------

Signed-off-by: Joan Fontanals Martinez <joan.martinez@jina.ai>
pull/33019/head
Joan Fontanals 2 years ago committed by GitHub
parent 303e568f27
commit c01f1a966d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      src/core/lib/iomgr/socket_utils_common_posix.cc

@ -357,8 +357,10 @@ grpc_error_handle grpc_set_socket_tcp_user_timeout(
return absl::OkStatus();
}
if (newval != timeout) {
// Do not fail on failing to set TCP_USER_TIMEOUT for now.
gpr_log(GPR_ERROR, "Failed to set TCP_USER_TIMEOUT");
gpr_log(GPR_INFO,
"Setting TCP_USER_TIMEOUT to value %d ms. Actual "
"TCP_USER_TIMEOUT value is %d ms",
timeout, newval);
return absl::OkStatus();
}
}

Loading…
Cancel
Save