@Override public void keepAlive() { // Send a NOOP command to the server to keep the connection alive. // Note: not all FTP servers support the NOOP command. if(ftpClient!=null) { try { ftpClient.sendNoOp(); } catch(IOException e) { // Checks if the IOException corresponds to a socket error and in that case, closes the connection checkSocketException(e); } } } }