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) } }