diff --git a/src/main/java/org/jenkinsci/plugins/workflow/log/BufferedBuildListener.java b/src/main/java/org/jenkinsci/plugins/workflow/log/BufferedBuildListener.java index 34a61c0f..e3ab264d 100644 --- a/src/main/java/org/jenkinsci/plugins/workflow/log/BufferedBuildListener.java +++ b/src/main/java/org/jenkinsci/plugins/workflow/log/BufferedBuildListener.java @@ -81,6 +81,7 @@ private Object readResolve() { @Override public void onClosed(Channel channel, IOException cause) { LOGGER.fine(() -> "closing " + channel.getName()); cos.close(channel, cause); + channel.removeListener(this); } }); return new BufferedBuildListener(cos);