Commit 2f207ac
Refactor SSEClientTransport to cache wrapped fetch function
Match the pattern used in StreamableHTTPClientTransport by creating
the wrapped fetch function once in the constructor instead of
recreating it on every auth call. This improves consistency between
the two transport implementations and avoids unnecessary function
recreation.
Changes:
- Add _fetchWithInit field to store the wrapped fetch function
- Initialize _fetchWithInit in constructor using createFetchWithInit
- Use _fetchWithInit in all auth() calls instead of creating inline
- Remove redundant createFetchWithInit calls from 3 locations
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent aa7df3f commit 2f207ac
1 file changed
+5
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
73 | 74 | | |
74 | 75 | | |
75 | 76 | | |
| |||
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
| |||
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | 98 | | |
100 | 99 | | |
101 | 100 | | |
102 | 101 | | |
103 | | - | |
| 102 | + | |
104 | 103 | | |
105 | 104 | | |
106 | 105 | | |
| |||
218 | 217 | | |
219 | 218 | | |
220 | 219 | | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | 220 | | |
225 | 221 | | |
226 | 222 | | |
227 | 223 | | |
228 | 224 | | |
229 | | - | |
| 225 | + | |
230 | 226 | | |
231 | 227 | | |
232 | 228 | | |
| |||
262 | 258 | | |
263 | 259 | | |
264 | 260 | | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | 261 | | |
269 | 262 | | |
270 | 263 | | |
271 | 264 | | |
272 | | - | |
| 265 | + | |
273 | 266 | | |
274 | 267 | | |
275 | 268 | | |
| |||
0 commit comments