summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SmartDeviceLink/SDLIAPSession.m4
1 files changed, 4 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLIAPSession.m b/SmartDeviceLink/SDLIAPSession.m
index 33a7cf1f1..47047ece9 100644
--- a/SmartDeviceLink/SDLIAPSession.m
+++ b/SmartDeviceLink/SDLIAPSession.m
@@ -125,6 +125,10 @@ NSTimeInterval const StreamThreadWaitSecs = 1.0;
- (void)sdl_dequeueAndWriteToOutputStream {
NSOutputStream *ostream = self.easession.outputStream;
+ if (!ostream.hasSpaceAvailable) {
+ return;
+ }
+
NSMutableData *remainder = [self.sendDataQueue frontBuffer];
if (remainder != nil && ostream.streamStatus == NSStreamStatusOpen) {