From f81feca2d6fce2d7c83053d79ff7965921e4448d Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Wed, 1 Feb 2017 21:33:41 -0500 Subject: [PATCH] Avoid crashes when closing peer connection client. // FREEBIE --- Signal/src/call/CallService.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Signal/src/call/CallService.swift b/Signal/src/call/CallService.swift index d92909551..3642d5c9c 100644 --- a/Signal/src/call/CallService.swift +++ b/Signal/src/call/CallService.swift @@ -110,7 +110,14 @@ protocol CallServiceObserver: class { // MARK: Ivars - var peerConnectionClient: PeerConnectionClient? + var peerConnectionClient: PeerConnectionClient? { + didSet { + AssertIsOnMainThread() + + Logger.debug("\(self.TAG) .peerConnectionClient setter: \(oldValue != nil) -> \(peerConnectionClient != nil)") + } + } + // TODO code cleanup: move thread into SignalCall? Or refactor messageSender to take SignalRecipient identifier. var thread: TSContactThread? var call: SignalCall? {