closeSession method

  1. @override
Future<void> closeSession(
  1. String sessionId
)
override

Implementation

@override
Future<void> closeSession(String sessionId) async {
  if (sessionId.trim().isEmpty) {
    throw AppleFoundationException(
      'Session ID cannot be empty',
      code: 'INVALID_SESSION_ID',
    );
  }

  try {
    await _invokeMethodWithTimeout<void>('closeSession', {
      'sessionId': sessionId,
    });
  } catch (e) {
    _logError('closeSession', e);
  } finally {
    try {
      _handlerManager.closeSession(sessionId);
    } catch (e) {
      _logError('closeSession - handler cleanup', e);
    }
  }
}