Commit d372f66
fix(pubsub): handle None in on response callback (#9982)
If the underlying RPC is shut down while pulling the messages with a
streming pull, the StreamingPullManager's _on_response() method is
invoked with None (as opposed to a StreamingPullResponse instance).
This commit handles this case and prevents an error in a background
thread on streaming pull manager shutdown.1 parent 9031316 commit d372f66
File tree
2 files changed
+22
-0
lines changed- pubsub
- google/cloud/pubsub_v1/subscriber/_protocol
- tests/unit/pubsub_v1/subscriber
2 files changed
+22
-0
lines changedLines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
542 | 542 | | |
543 | 543 | | |
544 | 544 | | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
545 | 552 | | |
546 | 553 | | |
547 | 554 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
721 | 721 | | |
722 | 722 | | |
723 | 723 | | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
724 | 739 | | |
725 | 740 | | |
726 | 741 | | |
| |||
0 commit comments