Skip to content

Commit

Permalink
Fix occasional crash in RemoteLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
kean committed May 19, 2024
1 parent 4ca008f commit 90860ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Add `URLSession.taskDescription` support (closes https://github.com/kean/Pulse/issues/251). The console will now use `.taskDescription` instead of the original request URL. This behavior can be customized using the new `ConsoleViewDelegate`.
- Fix https://github.com/kean/Pulse/issues/244, an issue with timeout interval not being recorded.
- Fix https://github.com/kean/Pulse/issues/230, ocasional crash in remote logger


## Pulse 4.1.1
Expand Down
3 changes: 1 addition & 2 deletions Sources/Pulse/RemoteLogger/RemoteLogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public final class RemoteLogger: ObservableObject, RemoteLoggerConnectionDelegat
// Private
private var isInitialized = false
private let keychain = Keychain(service: "com.github.kean.pulse")
private let connectionQueue = DispatchQueue(label: "com.github.kean.pulse.remote-logger")
private let log: OSLog

public enum ConnectionState {
Expand Down Expand Up @@ -123,7 +122,7 @@ public final class RemoteLogger: ObservableObject, RemoteLoggerConnectionDelegat
startBrowser()
}

cancellable = store.events.receive(on: connectionQueue).sink { [weak self] in
cancellable = store.events.receive(on: DispatchQueue.main).sink { [weak self] in
self?.didReceive(event: $0)
}

Expand Down

0 comments on commit 90860ca

Please sign in to comment.