From 1451cc1cc91927f38648fb36e2c0f20393f27c84 Mon Sep 17 00:00:00 2001 From: Vijay Date: Wed, 8 Nov 2017 13:12:26 +0000 Subject: fix memory leak for vescollector Issue-ID: DCAEGEN2-198 Change-Id: I09296ae4d13a0ad442bc139e69c13d19e4be0916 Signed-off-by: Vijay --- src/main/java/org/onap/dcae/commonFunction/EventPublisher.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/java/org') diff --git a/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java b/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java index 0d9cf91e..d76299df 100644 --- a/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java +++ b/src/main/java/org/onap/dcae/commonFunction/EventPublisher.java @@ -148,7 +148,7 @@ public class EventPublisher { log.info("Pending Message Count=" + pendingMsgs); } - //closePublisher(); + closePublisher(); log.info("pub.send invoked - no error"); CommonStartup.oplog.info(String.format("URL:%sTOPIC:%sEvent Published:%s", ueburl, topic, event)); @@ -156,6 +156,9 @@ public class EventPublisher { } catch (IOException | GeneralSecurityException | IllegalArgumentException e) { log.error("Unable to publish event: {} streamid: {}. Exception: {}", event, streamid, e); } + finally { + closePublisher(); + } } -- cgit 1.2.3-korg