增加在流结束时调用cmsg发送接口的实现
This commit is contained in:
@@ -3,3 +3,4 @@
|
|||||||
struct sender_scm;
|
struct sender_scm;
|
||||||
void send_scm_destroy(struct sender_scm *sender);
|
void send_scm_destroy(struct sender_scm *sender);
|
||||||
struct sender_scm* sender_scm_init(const char *profile, const char *section, void *logger);
|
struct sender_scm* sender_scm_init(const char *profile, const char *section, void *logger);
|
||||||
|
int sender_scm_cmsg_send(struct sender_scm *sender, struct tfe_cmsg *cmsg);
|
||||||
|
|||||||
@@ -1027,6 +1027,7 @@ void __stream_close_stat(struct tfe_stream_private * stream)
|
|||||||
|
|
||||||
void tfe_stream_destory(struct tfe_stream_private * stream)
|
void tfe_stream_destory(struct tfe_stream_private * stream)
|
||||||
{
|
{
|
||||||
|
struct tfe_proxy * proxy = stream->proxy_ref;
|
||||||
struct tfe_thread_ctx * thread = stream->thread_ref;
|
struct tfe_thread_ctx * thread = stream->thread_ref;
|
||||||
struct event_base * ev_base = thread->evbase;
|
struct event_base * ev_base = thread->evbase;
|
||||||
|
|
||||||
@@ -1084,8 +1085,18 @@ void tfe_stream_destory(struct tfe_stream_private * stream)
|
|||||||
{
|
{
|
||||||
future_destroy(stream->future_upstream_create);
|
future_destroy(stream->future_upstream_create);
|
||||||
}
|
}
|
||||||
FREE(&(stream->plugin_ctxs));
|
|
||||||
|
|
||||||
|
if (proxy->scm_sender && stream->cmsg)
|
||||||
|
{
|
||||||
|
sender_scm_cmsg_send(proxy->scm_sender, stream->cmsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stream->cmsg)
|
||||||
|
{
|
||||||
|
tfe_cmsg_destroy(stream->cmsg);
|
||||||
|
}
|
||||||
|
|
||||||
|
FREE(&(stream->plugin_ctxs));
|
||||||
tfe_proxy_thread_ctx_release(stream->thread_ref);
|
tfe_proxy_thread_ctx_release(stream->thread_ref);
|
||||||
stream->proxy_ref = NULL;
|
stream->proxy_ref = NULL;
|
||||||
FREE(&(stream));
|
FREE(&(stream));
|
||||||
|
|||||||
Reference in New Issue
Block a user