From d6e26d729ec7f508001da4198a497f5863144d44 Mon Sep 17 00:00:00 2001 From: Dan Diemer Date: Thu, 2 Jun 2022 09:29:14 -0500 Subject: [PATCH] Close task instead of cancel This feels more correct in the context of what we're doing. --- JustLog/Classes/LogstashDestinationSocket.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/JustLog/Classes/LogstashDestinationSocket.swift b/JustLog/Classes/LogstashDestinationSocket.swift index 3d2f211..5ebdea9 100644 --- a/JustLog/Classes/LogstashDestinationSocket.swift +++ b/JustLog/Classes/LogstashDestinationSocket.swift @@ -103,7 +103,9 @@ class LogstashDestinationSocket: NSObject, LogstashDestinationSocketProtocol { task.resume() dispatchGroup.notify(queue: queue) { - task.cancel() + task.closeRead() + task.closeWrite() + complete(sendStatus) } }