Commit 6bc6727
Implement unified timeout mechanism for stdio client cleanup
Changes from PR #555 by @cristipufu:
- Remove Windows-specific terminate_windows_process function
- Apply uniform 2-second timeout mechanism across all platforms:
- Try process.terminate() first (SIGTERM on Unix, similar on Windows)
- Wait up to 2 seconds for graceful termination
- If timeout occurs, force process.kill() (SIGKILL equivalent)
This ensures consistent behavior between Windows and Unix systems when
cleaning up stdio client processes, preventing hanging when MCP servers
don't respond to SIGTERM.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>1 parent 9be413a commit 6bc6727
2 files changed
+6
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
| |||
180 | 179 | | |
181 | 180 | | |
182 | 181 | | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
190 | 188 | | |
191 | 189 | | |
192 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
0 commit comments