修改shutdown引起的内存泄漏
This commit is contained in:
@@ -80,7 +80,7 @@ enum ssl_stream_stat
|
||||
SSL_DOWN_NEW,
|
||||
SSL_DOWN_ERR,
|
||||
SSL_DOWN_ERR_NO_CERT,
|
||||
SSL_DOWN_ERR_INAPPROPRIATE_FALLBACK,
|
||||
SSL_DOWN_ERR_INAPPROPRIATE_FALLBACK,
|
||||
|
||||
SSL_DOWN_CLOSING,
|
||||
SSL_DOWN_CLOSED,
|
||||
@@ -1998,7 +1998,10 @@ static void pxy_ssl_shutdown_cb(evutil_socket_t fd, short what, void * arg)
|
||||
ctx->ev = NULL;
|
||||
}
|
||||
|
||||
TFE_PROXY_STAT_INCREASE(STAT_FD_DEFER_CLOSE_IN_QUEUE, 1);
|
||||
if(what == 0)
|
||||
{
|
||||
TFE_PROXY_STAT_INCREASE(STAT_FD_DEFER_CLOSE_IN_QUEUE, 1);
|
||||
}
|
||||
|
||||
/*
|
||||
* Use the new (post-2008) semantics for SSL_shutdown() on a
|
||||
@@ -2009,6 +2012,10 @@ static void pxy_ssl_shutdown_cb(evutil_socket_t fd, short what, void * arg)
|
||||
* This is a good collection of recent and relevant documents:
|
||||
* http://bugs.python.org/issue8108
|
||||
*/
|
||||
if(what == EV_TIMEOUT)
|
||||
{
|
||||
SSL_set_shutdown(ctx->s_stream->ssl, SSL_RECEIVED_SHUTDOWN);
|
||||
}
|
||||
rv = SSL_shutdown(ctx->s_stream->ssl);
|
||||
|
||||
if (rv == 1)
|
||||
@@ -2063,7 +2070,7 @@ retry:
|
||||
|
||||
if (ctx->ev)
|
||||
{
|
||||
event_add(ctx->ev, NULL);
|
||||
event_add(ctx->ev, &retry_delay);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user