Bugfix: silent IOException because it's mostly due a process who is dead but its handle is still alive

This commit is contained in:
Laurent Clouet
2014-12-02 20:23:41 +00:00
parent e38a2e1ee6
commit 4de029b3a8

View File

@@ -550,17 +550,23 @@ public class Client {
long last_update_status = 0; long last_update_status = 0;
this.log.debug("renderer output"); this.log.debug("renderer output");
while ((line = input.readLine()) != null) { try {
nb_lines++; while ((line = input.readLine()) != null) {
this.updateRenderingMemoryPeak(line, ajob); nb_lines++;
this.updateRenderingMemoryPeak(line, ajob);
this.log.debug(line);
if ((new Date().getTime() - last_update_status) > 2000) { // only call the update every two seconds //this.log.debug(line);
this.updateRenderingStatus(line, nb_lines, ajob); if ((new Date().getTime() - last_update_status) > 2000) { // only call the update every two seconds
last_update_status = new Date().getTime(); this.updateRenderingStatus(line, nb_lines, ajob);
last_update_status = new Date().getTime();
}
} }
input.close();
}
catch (IOException err1) { // for the input.readline
// most likely The handle is invalid
this.log.error("Client:runRenderer exception(B) (silent error) " + err1);
} }
input.close();
this.log.debug("end of rendering"); this.log.debug("end of rendering");
} }
catch (Exception err) { catch (Exception err) {