Commit bf056a5
committed
mcp(fix[server_tools]): Avoid redundant is_alive() subprocess calls
why: `get_server_info` called `server.is_alive()` twice — once for
the `is_alive` field and once to guard `len(server.sessions)`. Each
call spawns a `tmux list-sessions` subprocess.
what:
- Store `is_alive()` result in local variable and reuse1 parent 57828c8 commit bf056a5
1 file changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
| 132 | + | |
132 | 133 | | |
133 | | - | |
| 134 | + | |
134 | 135 | | |
135 | 136 | | |
136 | | - | |
| 137 | + | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
| |||
0 commit comments