/impl/src/java/pt/estgp/estgweb/web/FtpServer.java |
---|
209,6 → 209,7 |
@Override |
public boolean storeFile(String remote, InputStream local) throws IOException |
{ |
logger.info("FTP store Timeout protection of " + FTP_DATA_STORE_TIMEOUT_SECONDS); |
this.remote = remote; |
this.local = local; |
Thread t = new Thread(this); |
219,13 → 220,12 |
Thread.sleep(1000); |
if(!t.isAlive()) |
{ |
if(this.isConnected()) |
break; |
} |
} |
if(!this.isConnected()) |
if(t.isAlive()) |
{ |
logger.info("Not Connected will interrupt"); |
logger.info("Timeout expired will interrupt"); |
t.interrupt(); |
return false; |
} |