Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-04-19 04:10:00 -0400
committerEike Stepper2013-04-19 04:10:00 -0400
commiteeef27373d8ba469c84980f2bc56a3be2c1cbfc0 (patch)
treee8a200d0f1e6418d80eac6f9064dd7672d98ba04
parent976a1e000462366cacc1828631620d1e62c3b8be (diff)
downloadcdo-eeef27373d8ba469c84980f2bc56a3be2c1cbfc0.tar.gz
cdo-eeef27373d8ba469c84980f2bc56a3be2c1cbfc0.tar.xz
cdo-eeef27373d8ba469c84980f2bc56a3be2c1cbfc0.zip
[405774] Memory leak through TimerTasks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=405774
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithMonitoring.java15
1 files changed, 12 insertions, 3 deletions
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithMonitoring.java b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithMonitoring.java
index 4d25822c1e..f178df2873 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithMonitoring.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/net4j/signal/IndicationWithMonitoring.java
@@ -12,6 +12,7 @@ package org.eclipse.net4j.signal;
import org.eclipse.net4j.buffer.BufferInputStream;
import org.eclipse.net4j.buffer.BufferOutputStream;
+import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import org.eclipse.net4j.util.lifecycle.LifecycleUtil;
@@ -128,9 +129,10 @@ public abstract class IndicationWithMonitoring extends IndicationWithResponse
{
sendProgress();
}
- catch (Exception ex)
+ catch (Throwable ex)
{
OM.LOG.error("ReportingMonitorTask failed", ex);
+ cancel();
}
}
};
@@ -158,13 +160,20 @@ public abstract class IndicationWithMonitoring extends IndicationWithResponse
private void sendProgress()
{
+ SignalProtocol<?> protocol = getProtocol();
+
try
{
- new MonitorProgressRequest(getProtocol(), -getCorrelationID(), getTotalWork(), getWork()).sendAsync();
+ int correlationID = -getCorrelationID();
+ double totalWork = getTotalWork();
+ double work = getWork();
+
+ new MonitorProgressRequest(protocol, correlationID, totalWork, work).sendAsync();
}
catch (Exception ex)
{
- if (LifecycleUtil.isActive(getProtocol().getChannel()))
+ IChannel channel = protocol.getChannel();
+ if (LifecycleUtil.isActive(channel))
{
OM.LOG.error(ex);
}

Back to the top