forked from hyperium/tonic
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tonic): Move TimeoutExpired out of transport
By moving the TimeoutExpired type from the transport module to the the tonic engine proper, the type is made available to other transport implementations and tonic can be built without the "server" feature while still returning a Status indicating the timeout. Alternative transport implementations can use the type, now that it is moved, when they want the tonic Status error handling to recognize the error as having been triggered by a timeout in the transport logic. The tonic Status error will have a code of Cancelled with a message of "Timeout expired". There is already a test for this: cargo test picks_server_timeout_if_thats_sorter which worked the original way and contines to work; but now a new transport implementation can get the same behavior. Addresses hyperium#1825.
- Loading branch information
Showing
4 changed files
with
23 additions
and
27 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
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
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
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