Skip to content

Commit

Permalink
Merge pull request #232 from oleg-nenashev/findbugs-cleanup/JENKINS-3…
Browse files Browse the repository at this point in the history
…7566-ProxyOutputStream-finalizer

[JENKINS-37566] - Stop nullifying channel in ProxyOutputStream#finalize()
  • Loading branch information
oleg-nenashev committed Nov 21, 2017
2 parents 2d5624c + d620065 commit 385744f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/hudson/remoting/ProxyOutputStream.java
Expand Up @@ -181,9 +181,8 @@ protected void finalize() throws Throwable {
super.finalize();
// 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) {
if(channel != null && oid != -1) {
channel.send(new Unexport(channel.newIoId(),oid));
channel = null;
oid = -1;
}
}
Expand Down

0 comments on commit 385744f

Please sign in to comment.