diff --git a/bitchat/Identity/SecureIdentityStateManager.swift b/bitchat/Identity/SecureIdentityStateManager.swift index 966f210a..4204e940 100644 --- a/bitchat/Identity/SecureIdentityStateManager.swift +++ b/bitchat/Identity/SecureIdentityStateManager.swift @@ -663,7 +663,7 @@ final class SecureIdentityStateManager: SecureIdentityStateManagerProtocol { func removeEphemeralSession(peerID: PeerID) { queue.sync(flags: .barrier) { - self.ephemeralSessions.removeValue(forKey: peerID) + _ = self.ephemeralSessions.removeValue(forKey: peerID) } } diff --git a/bitchat/Services/BLE/BLEService.swift b/bitchat/Services/BLE/BLEService.swift index 8891b40e..752d9758 100644 --- a/bitchat/Services/BLE/BLEService.swift +++ b/bitchat/Services/BLE/BLEService.swift @@ -2943,7 +2943,7 @@ extension BLEService: GossipSyncManager.Delegate { func sendPacket(to peerID: PeerID, packet: BitchatPacket) { onEngine { - sendPacketDirected(packet, to: peerID) + _ = sendPacketDirected(packet, to: peerID) } } @@ -3336,9 +3336,12 @@ extension BLEService { } func _test_drainPrivateMediaSendPipeline() async { + // Capture only the (Sendable) queue, not self, so the @Sendable + // dispatch closures carry no non-Sendable state. + let queue = messageQueue await withCheckedContinuation { continuation in - self.messageQueue.async { [weak self] in - self?.messageQueue.async { + queue.async { + queue.async { continuation.resume() } } @@ -3357,9 +3360,10 @@ extension BLEService { } func _test_drainNoiseMessagePipeline() async { + let queue = messageQueue await withCheckedContinuation { continuation in - self.messageQueue.async { - self.messageQueue.async { + queue.async { + queue.async { continuation.resume() } }