-
Notifications
You must be signed in to change notification settings - Fork 645
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update readStreamFrame() to error when a partial buffer is read.
When zero bytes are read when trying to read the 8 byte header, assume the stream is done and stop iterating. If 1-7 bytes are read when trying to read the 8 byte header, throw an IOException indicating the error. If anything other than the full N bytes are read for the message, i.e. if 0 to N-1 bytes are read, also throw an IOException. This ensures that unexpected log stream behavior is propaged as an error to the user. Signed-off-by: Thomas Van Doren <thomas.vandoren@gmail.com>
- Loading branch information
1 parent
2de9724
commit d4180c7
Showing
1 changed file
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters