We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
碰到问题,请在 https://github.com/YunaiV/ruoyi-vue-pro/issues 搜索是否存在相似的 issue。
不按照模板提交的 issue,会被系统自动删除。
@Override @SuppressWarnings("unchecked") public <Config extends FileClientConfig> void createOrUpdateFileClient(Long configId, Integer storage, Config config) { AbstractFileClient<Config> client = (AbstractFileClient<Config>) clients.get(configId); if (client == null) { client = this.createFileClient(configId, storage, config); client.init(); clients.put(client.getId(), client); } else { client.refresh(config); } } 1、 如上图代码, 在多线程请求下, client 会被重复创建和初始化 2、如果配置文件发生变化,ftp和sftp 在做refresh刷新的情况下,并没有close 掉原来的ftp或sftp,
@Override @SuppressWarnings("unchecked") public <Config extends FileClientConfig> void createOrUpdateFileClient(Long configId, Integer storage, Config config) { AbstractFileClient<Config> client = (AbstractFileClient<Config>) clients.get(configId); if (client == null) { client = this.createFileClient(configId, storage, config); client.init(); clients.put(client.getId(), client); } else { client.refresh(config); } }
The text was updated successfully, but these errors were encountered:
而且 感觉 FTPClient 并不是线程安全的,多个线程下 ,应该不能使用同一个FTPClient吧。
Sorry, something went wrong.
No branches or pull requests
碰到问题,请在 https://github.com/YunaiV/ruoyi-vue-pro/issues 搜索是否存在相似的 issue。
不按照模板提交的 issue,会被系统自动删除。
基本信息
@Override @SuppressWarnings("unchecked") public <Config extends FileClientConfig> void createOrUpdateFileClient(Long configId, Integer storage, Config config) { AbstractFileClient<Config> client = (AbstractFileClient<Config>) clients.get(configId); if (client == null) { client = this.createFileClient(configId, storage, config); client.init(); clients.put(client.getId(), client); } else { client.refresh(config); } }
1、 如上图代码, 在多线程请求下, client 会被重复创建和初始化
2、如果配置文件发生变化,ftp和sftp 在做refresh刷新的情况下,并没有close 掉原来的ftp或sftp,
The text was updated successfully, but these errors were encountered: