Skip to content

Conversation

@Deraen
Copy link
Contributor

@Deraen Deraen commented Mar 7, 2022

… right-away

InputStream .available only checks if data is available to read right
now. It is possible that data becomes available leter. Read method (used
by Transit internally) will block untill data is available or the stream
is closed.

It is best to let Transit read the stream. Empty streams throws an
exception with Transit, but we can catch that specific case and return
nil like previously.

Two test cases test the existing functionality, and third new test case
checks that Transit data is read correctly when the data becomes
available a bit later.

…ht away

InputStream .available only checks if data is available to read right
now. It is possible that data becomes available leter. Read method (used
by Transit internally) will block untill data is available or the stream
is closed.

It is best to let Transit read the stream. Empty streams throws an
exception with Transit, but we can catch that specific case and return
nil like previously.

Two test cases test the existing functionality, and third new test case
checks that Transit data is read correctly when the data becomes
available a bit later.
@dakrone dakrone merged commit c960a6a into dakrone:3.x Mar 17, 2022
@dakrone
Copy link
Owner

dakrone commented Mar 17, 2022

Merged, thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants