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

Add Reader Timeout option for data-disruption cases #7

Open
rokath opened this issue May 11, 2022 · 1 comment
Open

Add Reader Timeout option for data-disruption cases #7

rokath opened this issue May 11, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request quality secure correctness

Comments

@rokath
Copy link
Owner

rokath commented May 11, 2022

Change

func NewDecoder(r io.Reader, size int, multi bool) (p *decoder) 

into

func NewDecoder(r io.Reader, size int, multi bool, timeOut time.Duration) (p *decoder) 

The timeOut, if 0, does not influence the current Read behaviour. Otherwise, if a successfully decoded package needed internally more than the timeOut, Read returns together with the data an error containing a data-disruption warning.

@rokath
Copy link
Owner Author

rokath commented May 11, 2022

Add also tests for this .

@rokath rokath self-assigned this May 12, 2022
@rokath rokath added enhancement New feature or request quality secure correctness labels May 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request quality secure correctness
Projects
None yet
Development

No branches or pull requests

1 participant