Function: tramp-cleanup-all-connections
tramp-cleanup-all-connections is an autoloaded, interactive and
byte-compiled function defined in tramp-cmds.el.gz.
Signature
(tramp-cleanup-all-connections)
Documentation
Flush all Tramp internal objects.
This includes password cache, file cache, connection cache, buffers.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/net/tramp-cmds.el.gz
;;;###tramp-autoload
(defun tramp-cleanup-all-connections ()
"Flush all Tramp internal objects.
This includes password cache, file cache, connection cache, buffers."
(interactive)
;; Flush password cache.
(password-reset)
;; Flush file and connection cache.
(clrhash tramp-cache-data)
;; Remove ad-hoc proxies.
(let ((proxies tramp-default-proxies-alist))
(while proxies
(if (ignore-errors
(get-text-property 0 'tramp-ad-hoc (nth 2 (car proxies))))
(setq tramp-default-proxies-alist
(delete (car proxies) tramp-default-proxies-alist)
proxies tramp-default-proxies-alist)
(setq proxies (cdr proxies)))))
(when (and tramp-default-proxies-alist tramp-save-ad-hoc-proxies)
(customize-save-variable
'tramp-default-proxies-alist tramp-default-proxies-alist))
;; Cancel timers.
(cancel-function-timers 'tramp-timeout-session)
;; Remove processes and buffers.
(dolist (name (tramp-list-tramp-buffers))
(when (processp (get-buffer-process name)) (delete-process name))
(when (bufferp (get-buffer name)) (kill-buffer name)))
;; The end.
(run-hooks 'tramp-cleanup-all-connections-hook))