detach method
Releases the session.
An owned process is stopped through the identity-gated tree stop; a borrowed target is never signalled.
Implementation
Future<ProjectBrowserSessionOutcome> detach() async {
if (_ownership == ProjectSessionOwnership.owned) {
await _stopOwned();
return _record(
ProjectBrowserSessionOutcome(
ok: true,
url: _url,
ownership: _ownership,
),
);
}
_attached = false;
return _record(
ProjectBrowserSessionOutcome(
ok: true,
url: _url,
ownership: _ownership,
detail: 'borrowed target left untouched',
),
);
}