Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #125 from diemer/master
Browse files Browse the repository at this point in the history
Fix unbalanced dispatch leave crash
  • Loading branch information
albertodebortoli authored Jun 6, 2022
2 parents fba12c8 + d6e26d7 commit b9bb34d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions JustLog/Classes/LogstashDestinationSocket.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,19 @@ class LogstashDestinationSocket: NSObject, LogstashDestinationSocketProtocol {
return
}

self.dispatchQueue.async {
self.dispatchQueue.async(group: dispatchGroup) {
if let error = error {
sendStatus[tag] = error
}

dispatchGroup.leave()
}
}
}
task.resume()

dispatchGroup.notify(queue: queue) {
task.cancel()
task.closeRead()
task.closeWrite()

complete(sendStatus)
}
}
Expand Down

0 comments on commit b9bb34d

Please sign in to comment.