Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Raise an exception if a channel is closed while processing frames in a
synchronous transport. Solves #31
- Loading branch information
1 parent
5985024
commit c03d28c
Showing
2 changed files
with
27 additions
and
0 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
c03d28c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this patch is not suitable:
in consume function, if my code throw an exception, it will trigger line 1, then trigger this patch's code, throw a ChannelClosed exception; this exception will overlap my exception, and I get no idea what's wrong with my code. It's difficult to debug.
c03d28c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you submit a PR that does what you're looking for? I never use the synchronous transport but I'd like it to work right, I just don't have any context for the situation. Maybe another issue with a different failure case that I can use as a regression test?
c03d28c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please review my pull request and modify rpc_server.py file. you can make a typo in on_request function, for example, "msg -> mgs", you will see!