Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silence output stream write error #850

Closed
NicoleYarroch opened this issue Jan 24, 2018 · 1 comment
Closed

Silence output stream write error #850

NicoleYarroch opened this issue Jan 24, 2018 · 1 comment
Labels
best practice Not a defect but something that should be improved anyway
Milestone

Comments

@NicoleYarroch
Copy link
Contributor

Bug Report

In the the SDLIAPSession class, the sdl_dequeueAndWriteToOutputStream method attempts to write to the output stream even if the output stream has no space available. This produces the warning

332 failed to write because stream does not have space available

To silence this warning, the sdl_dequeueAndWriteToOutputStream method should check if the ostream has space available before attempting to write. If it does not, the method should return.

- (void)sdl_dequeueAndWriteToOutputStream {
    NSOutputStream *ostream = self.easession.outputStream;
    if (!ostream.hasSpaceAvailable) {
         return;
    }
   ...
}
Reproduction Steps
  1. Connect the SDL_iOS example app to a TDK
  2. Open the app on the TDK
Expected Behavior

There should be no output stream write errors in the debug logs.

Observed Behavior

There are output stream write errors in the debug logs.

OS & Version Information
  • iOS Version: 11.2.2
  • SDL iOS Version: 5.1.1
  • Testing Against: TDK (SYNC 3)
@NicoleYarroch NicoleYarroch changed the title Silence write to output stream error Silence output stream write error Jan 24, 2018
@NicoleYarroch NicoleYarroch added best practice Not a defect but something that should be improved anyway iOS 11 labels Jan 26, 2018
@NicoleYarroch
Copy link
Contributor Author

This error started appearing on iOS v 11.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
best practice Not a defect but something that should be improved anyway
Projects
None yet
Development

No branches or pull requests

2 participants