- Timestamp:
- 2008-10-15T18:07:39+13:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/download/DownloadJob.java
r17525 r17548 446 446 } 447 447 if(state == STOPPED) { 448 boolean terminatePerlScript = true; 449 448 450 // When GLI is working with wget-based download modes (OAI, MediaWiki and Web download) 449 451 // and the STOP button has been pressed, wget needs to be prematurely terminated. … … 469 471 System.err.println("GLI sent STOP signal to perl to terminate wget." 470 472 + "\nGot response from perl: " + response); 473 474 response = clientReader.readLine(); // see whether the perl script is ready to be terminated 475 System.err.println("Got another response from perl: " + response); 471 476 os.close(); 472 477 … … 475 480 clientReader = null; 476 481 clientSocket = null; 482 483 if(response == null) { 484 terminatePerlScript = false; 485 } 477 486 } catch(IOException ex) { 478 487 System.err.println("Tried to communicate through client socket - port " + this.port + ", but got exception: " + ex); … … 485 494 //prcs.getInputStream().close(); 486 495 prcs.getErrorStream().close(); 487 prcs.destroy(); // This doesn't always work, but it's worth a try 488 prcs = null; 496 if(terminatePerlScript) { 497 prcs.destroy(); // This doesn't always work, but it's worth a try 498 prcs = null; 499 } 489 500 br.close(); 490 501 br = null;
Note:
See TracChangeset
for help on using the changeset viewer.