git-svn-id: svn://svn.jdownloader.org/jdownloader/trunk@5784 ebf7c1c2-ba36-0410-9fe8-c592906822b4

This commit is contained in:
coalado 2009-05-22 19:11:49 +00:00
parent 76da2f3df7
commit 6b06c1a282
2 changed files with 16 additions and 1 deletions

View File

@ -938,6 +938,17 @@ abstract public class DownloadInterface {
} }
public void closeConnections() {
try{
inputStream.close();
source.close();
logger.info("Closed connection before closing file");
}catch(Exception e){
}
}
} }
public static final int ERROR_REDIRECTED = -1; public static final int ERROR_REDIRECTED = -1;

View File

@ -173,7 +173,11 @@ public class RAFDownload extends DownloadInterface {
} }
} }
// //
logger.info("CLOSE HD FILE"); logger.info("Close connections if the are not closed yet");
for(Chunk c:this.getChunks()){
c.closeConnections();
}
logger.info("Close File. Let AV programs run");
try { try {
outputChannel.force(false); outputChannel.force(false);
} catch (Exception e) { } catch (Exception e) {