Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Unexport is new, so for older versions fall back to EOF.
Better to have a bogus error message than memory leak.
  • Loading branch information
kohsuke committed Mar 27, 2014
1 parent 9b24114 commit 57c3f1a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/hudson/remoting/ProxyWriter.java
Expand Up @@ -193,7 +193,10 @@ protected void finalize() throws Throwable {
// if we haven't done so, release the exported object on the remote side.
// if the object is auto-unexported, the export entry could have already been removed.
if(channel!=null) {
channel.send(new Unexport(channel.newIoId(),oid));
if (channel.remoteCapability.supportsProxyWriter2_35())
channel.send(new Unexport(channel.newIoId(),oid));
else
channel.send(new EOF(channel.newIoId(),oid));
channel = null;
oid = -1;
}
Expand Down

0 comments on commit 57c3f1a

Please sign in to comment.