From 5ce118b05e07c5d4ae76118bb3030008b9c60394 Mon Sep 17 00:00:00 2001 From: scw00 Date: Mon, 19 Nov 2018 15:13:58 +0800 Subject: [PATCH 1/2] QUIC: Fixed the signalActivity is not work on QUIC branch --- iocore/net/UnixNet.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc index eb95841f934..3308d889268 100644 --- a/iocore/net/UnixNet.cc +++ b/iocore/net/UnixNet.cc @@ -234,7 +234,7 @@ initialize_thread_for_net(EThread *thread) thread->schedule_every(inactivityCop, HRTIME_SECONDS(cop_freq)); thread->set_tail_handler(nh); - thread->ep = (EventIO *)ats_malloc(sizeof(EventIO)); + thread->ep = new EventIO(); thread->ep->type = EVENTIO_ASYNC_SIGNAL; #if HAVE_EVENTFD thread->ep->start(pd, thread->evfd, nullptr, EVENTIO_READ); From 73aec5409488da4fd66392b730944dd8f04d5182 Mon Sep 17 00:00:00 2001 From: Masakazu Kitajo Date: Mon, 19 Nov 2018 15:59:22 +0800 Subject: [PATCH 2/2] QUIC: Fixed the signalActivity is not work on QUIC branch Co-Authored-By: scw00 <616955249@qq.com> --- iocore/net/UnixNet.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iocore/net/UnixNet.cc b/iocore/net/UnixNet.cc index 3308d889268..c60b1916ffd 100644 --- a/iocore/net/UnixNet.cc +++ b/iocore/net/UnixNet.cc @@ -234,7 +234,8 @@ initialize_thread_for_net(EThread *thread) thread->schedule_every(inactivityCop, HRTIME_SECONDS(cop_freq)); thread->set_tail_handler(nh); - thread->ep = new EventIO(); + thread->ep = (EventIO *)ats_malloc(sizeof(EventIO)); + new (thread->ep) EventIO(); thread->ep->type = EVENTIO_ASYNC_SIGNAL; #if HAVE_EVENTFD thread->ep->start(pd, thread->evfd, nullptr, EVENTIO_READ);