diff --git a/utils/napi_utils/src/event_manager.cpp b/utils/napi_utils/src/event_manager.cpp index 75f3e108de336fe55e9c34ac44fba63dfd0aa145..e3d77df4a4f2f4246a1071c1579f0d621918daeb 100644 --- a/utils/napi_utils/src/event_manager.cpp +++ b/utils/napi_utils/src/event_manager.cpp @@ -128,16 +128,19 @@ void EventManager::EmitByUvWithoutCheckShared(const std::string &type, void *dat if (type == ON_HEADER_RECEIVE || type == ON_HEADERS_RECEIVE) { auto tempMap = static_cast *>(data); delete tempMap; + return; } } else if (foundHeader && !foundHeaders) { if (type == ON_HEADERS_RECEIVE) { auto tempMap = static_cast *>(data); delete tempMap; + return; } } else if (!foundHeader) { if (type == ON_HEADER_RECEIVE) { auto tempMap = static_cast *>(data); delete tempMap; + return; } }