Subject: Re: bug#24432: 25.1; tramp-cleanup-connection is not removing connection from completion list.

From: Michael Albinus <[email-masked]>
Date: Wed, 14 Sep 2016 11:55:24 +0200

Thierry Volpiatto <[email-masked]> writes:

Hi Thierry,

> To reproduce:
> C-x C-f /sudo:: RET
> M-x tramp-cleanup-connection
> Choose connection and RET
>
> The connection is closed (process deleted and buffers killed) but the
> connection is not removed from tramp-cache-data so when doing again
> M-x tramp-cleanup-connection the item still remaining in completion.

Indeed.

> The reason is that tramp try to remove 
> ["sudo" "root" "localhost" "" nil] from hash-table
> whereas the key in hash-table is
> ["sudo" "root" "localhost" nil nil]
> This is due to tramp-dissect-file-name that returns
> ["sudo" "root" "localhost" "" nil] instead of
> ["sudo" "root" "localhost" nil nil]

That's not the reason, tramp-{get,set}-connection-property normalize the
vector used in the hash table. But the connection was still there due to
some re-initialization of the connection's hash entry once it was removed.

I've pushed a fix to the master. Could you, pls, check?

Best regards, Michael.