Commit 23350e9
Fix nil pointer dereference on SSH session closure in Terminal.run
Added a nil check for `t.cmd` before invoking `t.cmd.Wait()` in the terminal's run loop. This resolves the panic caused by closing the SSH session (via t.Exit() or session.Close()) when `t.cmd` is not initialized, ensuring graceful termination of the terminal.1 parent fe1ab53 commit 23350e9
1 file changed
+4
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
306 | 306 | | |
307 | 307 | | |
308 | 308 | | |
309 | | - | |
310 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
311 | 313 | | |
312 | 314 | | |
313 | 315 | | |
| |||
0 commit comments