closeFor method

  1. @override
Future<void> closeFor(
  1. String atSign
)
override

Close the bundle for atSign and drop the factory's reference to it. Safe to call when no bundle exists for atSign — the call is a no-op. After closeFor, bundleFor returns null and initialize builds a fresh bundle on next call.

Implementation

@override
Future<void> closeFor(String atSign) async {
  final bundle = _bundles.remove(atSign);
  if (bundle == null) return;
  try {
    await bundle.close();
  } catch (e, st) {
    _logger.warning('Error closing bundle for $atSign: $e\n$st');
  }
}