Commit 9d197dd
ssh remoting: Fix SSH connection not being closed (#18329)
This fixes the `SshSession` being leaked.
There were two leaks:
1. `Arc<SshSession>` itself got leaked into the `SettingsObserver` that
lives as long as the application. Fixed with a weak reference.
2. The two tasks spawned by an `SshSession` had a circular dependency
and didn't exit while the other one was running. Fixed by fixing (1)
and then attaching one of the tasks to the `SshSession`, which means
it gets dropped with the session itself, which leads the other task
to error and exit.
Co-authored-by: Bennet <[email protected]>
Release Notes:
- N/A
---------
Co-authored-by: Bennet <[email protected]>1 parent 623a6ec commit 9d197dd
File tree
5 files changed
+53
-15
lines changed- crates
- project/src
- recent_projects/src
- remote/src
- rpc/src
- worktree/src
5 files changed
+53
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| 337 | + | |
337 | 338 | | |
338 | 339 | | |
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
342 | 343 | | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
348 | 351 | | |
349 | 352 | | |
350 | 353 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
509 | 509 | | |
510 | 510 | | |
511 | 511 | | |
512 | | - | |
| 512 | + | |
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
176 | | - | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
267 | | - | |
| 267 | + | |
268 | 268 | | |
269 | | - | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
270 | 279 | | |
271 | 280 | | |
272 | 281 | | |
| |||
275 | 284 | | |
276 | 285 | | |
277 | 286 | | |
278 | | - | |
| 287 | + | |
279 | 288 | | |
280 | 289 | | |
281 | 290 | | |
| |||
293 | 302 | | |
294 | 303 | | |
295 | 304 | | |
| 305 | + | |
296 | 306 | | |
297 | 307 | | |
298 | 308 | | |
| |||
302 | 312 | | |
303 | 313 | | |
304 | 314 | | |
| 315 | + | |
305 | 316 | | |
306 | 317 | | |
307 | 318 | | |
| |||
313 | 324 | | |
314 | 325 | | |
315 | 326 | | |
| 327 | + | |
316 | 328 | | |
317 | 329 | | |
318 | 330 | | |
| |||
322 | 334 | | |
323 | 335 | | |
324 | 336 | | |
| 337 | + | |
325 | 338 | | |
326 | 339 | | |
327 | 340 | | |
328 | | - | |
| 341 | + | |
329 | 342 | | |
330 | 343 | | |
331 | 344 | | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
332 | 349 | | |
333 | 350 | | |
334 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
18 | 36 | | |
19 | 37 | | |
20 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
475 | | - | |
| 475 | + | |
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| |||
0 commit comments