The replacement was to provide a session() function that returns an Arc / MutexGuard wrapped reference to the optional session. This isn't useful for us here because we don't and AFAIK can't take ownership of the session which we need because the Sesison::close function consumes the session (it can't be reopened). Our solution requires an upstream change to the Client type adding a close_session function that just closes the session if one is open.
The
Client
type previously had aDrop
implementation that closed the session if the Client had an open one. This seems to have caused problems in other downstream projects and was subsequently removed: https://github.com/iqlusioninc/tmkms/issues/37 https://github.com/iqlusioninc/yubihsm.rs/pull/265The replacement was to provide a
session()
function that returns an Arc / MutexGuard wrapped reference to the optional session. This isn't useful for us here because we don't and AFAIK can't take ownership of the session which we need because the Sesison::close function consumes the session (it can't be reopened). Our solution requires an upstream change to theClient
type adding aclose_session
function that just closes the session if one is open.This resolves #190