fix dtt
This commit is contained in:
@@ -354,6 +354,15 @@ func (o *Orchestrator) runAccount(ctx context.Context, task store.Task, runID in
|
||||
_ = dst.Close()
|
||||
}()
|
||||
|
||||
// Keep the destination connection warm. It sits idle for the whole
|
||||
// source-side metadata scan (Pass 1 of CopyFolder), which on a large
|
||||
// mailbox runs for minutes; without traffic the server drops it and every
|
||||
// subsequent APPEND fails with "use of closed network connection", copying
|
||||
// nothing. Periodic NOOPs prevent that. Only dst needs it — src is
|
||||
// continuously busy scanning/fetching. Bound to actx so it stops with the
|
||||
// account.
|
||||
go imapx.Keepalive(actx, dst, imapx.KeepaliveInterval)
|
||||
|
||||
// Progress watchdog: track the last time we saw scan/copy activity; if it
|
||||
// goes quiet for stallTimeout, cancel the account so the connections close
|
||||
// and this worker unwinds (it would otherwise block forever on a silent
|
||||
|
||||
Reference in New Issue
Block a user