Skip to content
New issue

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

bug: 文件发送rule修改,避免OOM #325

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1112,10 +1112,11 @@ func (m *Mgr) ensureFiles(
blog.Debugf("remote: ensure file %s and match rule %d", fd.File.FilePath, t)
servers := make([]*dcProtocol.Host, 0, 0)
switch t {
case dcSDK.FilterRuleHandleDefault:
r = append(r, "")
continue

//此处会导致文件不被发送,注释掉保证文件都在此处发送,共用内存锁避免OOM
/*case dcSDK.FilterRuleHandleDefault:
r = append(r, "")
continue
*/
case dcSDK.FilterRuleHandleAllDistribution:
// cleaner = append(cleaner, f)
if err = m.fileMessageBank.ensure(sender, sandbox); err != nil {
Expand Down