Commit 65356a1
committed
fix(streamable-http): downgrade stateless 'Terminating session: None' log
In stateless mode every request created a transport with mcp_session_id=None
and terminated it on completion, producing
'INFO: Terminating session: None' on every request. The repeated noise made
real session terminations hard to find and confused users into thinking
their connection was dropping.
Branch on mcp_session_id in terminate(): keep the existing INFO log for
stateful session terminations, and switch the stateless path to a DEBUG
log with a clearer message ("Stateless request completed, cleaning up
transport"). Adds two caplog tests covering both branches.
Closes #2329.1 parent e8e6484 commit 65356a1
2 files changed
Lines changed: 42 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
769 | 769 | | |
770 | 770 | | |
771 | 771 | | |
772 | | - | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
773 | 776 | | |
774 | 777 | | |
775 | 778 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
767 | 768 | | |
768 | 769 | | |
769 | 770 | | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
| 805 | + | |
| 806 | + | |
| 807 | + | |
770 | 808 | | |
771 | 809 | | |
772 | 810 | | |
| |||
0 commit comments