Commit 3fa8f2d
committed
Tear down SSH tunnel on abnormal client disconnect
`nrepl--ssh-tunnel-connect' spawns a separate `ssh' subprocess for port
forwarding and stashes it on the client buffer's `nrepl-tunnel-buffer'.
The orderly teardown path -- `cider-quit' -> `cider--close-connection'
-- already kills the tunnel buffer.
But the `nrepl-client-sentinel' path, which fires on abnormal client-
process death (server crash, network drop, kill -9), only ran the
disconnect hooks and the maybe-kill-server-buffer cleanup. Neither
touches the tunnel, so the `ssh' subprocess kept running until Emacs
itself exited.
Add the tunnel cleanup to the sentinel, symmetric with the existing
`nrepl--maybe-kill-server-buffer' call. Same layering: the transport
sentinel owns transport-infrastructure cleanup.1 parent b95dcc9 commit 3fa8f2d
2 files changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
346 | 357 | | |
347 | 358 | | |
348 | 359 | | |
| |||
0 commit comments