tfe_stream_addr_create_by_fd放到tfe_types.h供ssl_stream调用。

This commit is contained in:
zhengchao
2018-09-30 11:01:18 +08:00
parent 319ecfeabb
commit 966d36b526
4 changed files with 76 additions and 5 deletions

View File

@@ -1275,8 +1275,12 @@ retry:
if (ctx->retries++ >= MAX_NET_RETRIES)
{
TFE_LOG_ERROR(logger, "Failed to shutdown SSL connection cleanly: "
"Max retries reached. Closing fd.\n");
struct tfe_stream_addr* addr=tfe_stream_addr_create_by_fd(fd);
char* addr_string=tfe_stream_addr_to_str(addr);
TFE_LOG_ERROR(logger, "Failed to shutdown SSL connection cleanly: %s"
"Max retries reached. Closing fd %d.", addr_string, fd);
tfe_stream_addr_free(addr);
free(addr_string);
goto complete;
}
@@ -1289,7 +1293,7 @@ retry:
else
{
TFE_LOG_ERROR(logger, "Failed to shutdown SSL connection cleanly: "
"Cannot create event. Closing fd.\n");
"Cannot create event. Closing fd %d.", fd);
}
return;
complete: