diff options
Diffstat (limited to 'DomainDig/IntegrationService.swift')
| -rw-r--r-- | DomainDig/IntegrationService.swift | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/DomainDig/IntegrationService.swift b/DomainDig/IntegrationService.swift index 23085d3..de24c23 100644 --- a/DomainDig/IntegrationService.swift +++ b/DomainDig/IntegrationService.swift @@ -768,9 +768,7 @@ private final class SMTPChannel { connection.stateUpdateHandler = { [weak self] state in switch state { case .ready: - DispatchQueue.global(qos: .utility).async { - self?.startReceiveLoop() - } + self?.scheduleReceiveLoop() continuation.resume() case .failed(let error): continuation.resume(throwing: error) @@ -782,6 +780,12 @@ private final class SMTPChannel { } } + private func scheduleReceiveLoop() { + DispatchQueue.global(qos: .utility).async { [weak self] in + self?.startReceiveLoop() + } + } + func cancel() { connection.cancel() } |
