Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Avoid unnecessary exception in TimeoutStream #1015

Merged

Conversation

stephenjust
Copy link
Contributor

Underlying stream implementation may throw if we try to set a read/write timeout on a non-readable or non-writable stream. Add an additional check to prevent this exception from being thrown.

Since this gets hit on every blob read, the impact is fairly significant for services which download many blobs.

Fixes #1014

Underlying stream implementation may throw if we try to set a read/write timeout on a non-readable or non-writable stream. Add an additional check to prevent this exception from being thrown.

Since this gets hit on every blob read, the impact is fairly significant for services which download many blobs.
@kasobol-msft kasobol-msft merged commit 76b5090 into Azure:master Aug 19, 2020
@stephenjust stephenjust deleted the stjust/avoid-exception-timeoutstream branch August 19, 2020 19:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TimeoutStream doesn't check if a stream is readable/writable before attempting to set timeout values
2 participants