修正ssl_stream输出errlog时downstream误写为upstream的问题

This commit is contained in:
Lu Qiuwen
2018-10-23 19:25:41 +08:00
parent e2030da1cd
commit 207a7af857

View File

@@ -860,7 +860,6 @@ void ssl_stream_log_error(struct bufferevent * bev, enum tfe_conn_dir dir, void*
int fd=bufferevent_getfd(bev);
char* addr_string=tfe_string_addr_create_by_fd(fd, dir);
/* Can happen for socket errs, ssl errs;
* may happen for unclean ssl socket shutdowns. */
sslerr = bufferevent_get_openssl_error(bev);
@@ -1403,7 +1402,7 @@ static void ssl_client_connected_eventcb(struct bufferevent * bev, short events,
if (events & BEV_EVENT_ERROR)
{
ATOMIC_INC(&(mgr->stat_val[SSL_DOWN_ERR]));
ssl_stream_log_error(bev, CONN_DIR_UPSTREAM, mgr->logger);
ssl_stream_log_error(bev, CONN_DIR_DOWNSTREAM, mgr->logger);
promise_failed(p, FUTURE_ERROR_EXCEPTION, "connect to client failed.");
}
else if(events & BEV_EVENT_EOF)