Commit 5fcb221
Charlie Tonneslan
fix: prevent stack overflow from re-entrant close() in StreamableHTTP transport
Add re-entrancy guard to WebStandardStreamableHTTPServerTransport.close()
to prevent RangeError when multiple transports close simultaneously.
Clear stream mapping before calling cleanup functions to avoid infinite
recursion from cancel callbacks that delete from the mapping or chain
to other close operations.
Fixes #16991 parent ccb78f2 commit 5fcb221
1 file changed
Lines changed: 22 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
239 | 239 | | |
240 | 240 | | |
241 | 241 | | |
| 242 | + | |
242 | 243 | | |
243 | 244 | | |
244 | 245 | | |
| |||
887 | 888 | | |
888 | 889 | | |
889 | 890 | | |
890 | | - | |
891 | | - | |
892 | | - | |
893 | | - | |
894 | | - | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
| 895 | + | |
| 896 | + | |
| 897 | + | |
| 898 | + | |
895 | 899 | | |
896 | | - | |
897 | | - | |
898 | | - | |
| 900 | + | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
899 | 913 | | |
900 | 914 | | |
901 | 915 | | |
| |||
0 commit comments