Commit 2c715b9
Invalidate SFTP connection cache when disconnecting from SSH
This fixes a bug where we would keep a stale connection in the cache
such as in the following example:
```
files.put(src='test.sh',
dest='/tmp/test_before.sh',
force=True)
server.reboot(delay=20, interval=5, reboot_timeout=600)
files.put(src='test.sh',
dest='/tmp/spinner.sh',
force=True)
```
The first `files.put` caches an SFTP connection that gets closed
during the reboot, and the second `files.put` will try to use the
memoized connection which is now invalid.1 parent faa366e commit 2c715b9
2 files changed
+4
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
267 | 270 | | |
268 | 271 | | |
269 | 272 | | |
| |||
0 commit comments