kill method

Future<ActionResult> kill(
  1. String sessionRef
)

Terminates sessionRef, then refreshes. Returns the outcome.

Implementation

Future<ActionResult> kill(String sessionRef) async {
  try {
    final r = await _service.killSession(nodeId, sessionRef);
    await refresh();
    return ActionResult(
      r.ok,
      r.message.isEmpty ? 'Session terminated.' : r.message,
    );
  } on AppError catch (e) {
    return ActionResult(false, e.message);
  }
}