diff options
| author | Michael Albinus | 2016-08-15 12:29:20 +0200 |
|---|---|---|
| committer | Michael Albinus | 2016-08-15 12:29:20 +0200 |
| commit | 9c2ce57719d0db8ac0a01b65d7e8d7ccc3f2d6ca (patch) | |
| tree | 25e5622f56d6e416a0ca0c73096e7407bd831bcc | |
| parent | 9c2ea5cdd626f011cb535824223e49e5bdb20146 (diff) | |
| download | emacs-9c2ce57719d0db8ac0a01b65d7e8d7ccc3f2d6ca.tar.gz emacs-9c2ce57719d0db8ac0a01b65d7e8d7ccc3f2d6ca.zip | |
Fix stale cache problem in Tramp
* lisp/net/tramp-cache.el (tramp-get-connection-property):
Check, that a process as key is still running. (Bug#22478)
| -rw-r--r-- | lisp/net/tramp-cache.el | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index 07176be6e4e..76b49a09e3a 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el | |||
| @@ -237,9 +237,14 @@ connection, returns DEFAULT." | |||
| 237 | (aset key 3 nil) | 237 | (aset key 3 nil) |
| 238 | (aset key 4 nil)) | 238 | (aset key 4 nil)) |
| 239 | (let* ((hash (tramp-get-hash-table key)) | 239 | (let* ((hash (tramp-get-hash-table key)) |
| 240 | (value (if (hash-table-p hash) | 240 | (value |
| 241 | (gethash property hash default) | 241 | ;; If the key is an auxiliary process object, check whether |
| 242 | default))) | 242 | ;; the process is still alive. |
| 243 | (if (and (processp key) (not (memq (process-status key) '(run open)))) | ||
| 244 | default | ||
| 245 | (if (hash-table-p hash) | ||
| 246 | (gethash property hash default) | ||
| 247 | default)))) | ||
| 243 | (tramp-message key 7 "%s %s" property value) | 248 | (tramp-message key 7 "%s %s" property value) |
| 244 | value)) | 249 | value)) |
| 245 | 250 | ||