From 0bf0d386ab041654f69f32b474c5fe4e1f8d2c07 Mon Sep 17 00:00:00 2001 From: Joel Fischer Date: Tue, 6 Oct 2020 14:18:53 -0400 Subject: First test fix --- SmartDeviceLink/private/SDLIAPDataSession.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/SmartDeviceLink/private/SDLIAPDataSession.m b/SmartDeviceLink/private/SDLIAPDataSession.m index 785573fde..d44ea3a82 100644 --- a/SmartDeviceLink/private/SDLIAPDataSession.m +++ b/SmartDeviceLink/private/SDLIAPDataSession.m @@ -333,7 +333,11 @@ NS_ASSUME_NONNULL_BEGIN while (self.ioStreamThread != nil && !self.ioStreamThread.cancelled) { // Enqueued data will be written to and read from the streams in the runloop - [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.25f]]; + BOOL result = [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.25f]]; + if (!result) { + SDLLogE(@"The run loop returned a failure even though the input and output streams should be attached. Input stream: %@ Output stream: %@ Accessory: %@", self.eaSession.inputStream, self.eaSession.outputStream, self.accessory); + break; + } } SDLLogD(@"Closing the accessory event loop on thread: %@", NSThread.currentThread.name); -- cgit v1.2.1