closeSession method
Close a session by it's id.
correlation_id
(optional) transaction id to trace execution through call chain.sessionId
an id of the session to be closed Return Future that receives closed session Throws error.
Implementation
@override
Future<SessionV1?> closeSession(
String? correlationId, String sessionId) async {
SessionV1? session;
_sessions.forEach((d) {
session = d.id == sessionId ? d : null;
});
if (session != null) {
session!.active = false;
}
return session;
}