Since it does not return a value representing the NBD session, Client.list should terminate the session itself. However, it does that using a hard disconnect, even when that is forbidden.
The NBD protocol documentation says:
A party that is mandated by this document to terminate the
session MUST initiate a hard disconnect if it is not possible
to use a soft disconnect. Such circumstances include: where
that party is the server and it cannot return an error
(e.g. after an NBD_OPT_EXPORT_NAME it cannot satisfy),
and where that party is the client following a failed TLS
negotiation.
A party MUST NOT initiate a hard disconnect save where set out
in this section. Therefore, unless a client's situation falls
within the provisions of the previous paragraph or the
client detects a breach of a mandatory condition, it MUST NOT
use a hard disconnect, and hence its only option to terminate
the session is via a soft disconnect.
The Client.list function MUST send NBD_OPT_ABORT if the list or a suitable error is returned from the server.
[ ] When this is fixed, some of the test cases marked with TODO may need to be updated to remove the workaround that was added due to this bug.
Since it does not return a value representing the NBD session,
Client.list
should terminate the session itself. However, it does that using a hard disconnect, even when that is forbidden. The NBD protocol documentation says:The
Client.list
function MUST sendNBD_OPT_ABORT
if the list or a suitable error is returned from the server.