From a8f519f0dd8db028827a0e703a9ed5724cac2315 Mon Sep 17 00:00:00 2001 From: Jan Romann Date: Wed, 23 Oct 2024 15:55:32 +0200 Subject: [PATCH] refactor(servient): move server starting code into private method --- lib/src/core/implementation/servient.dart | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/src/core/implementation/servient.dart b/lib/src/core/implementation/servient.dart index c93c98a8..d7d57da9 100644 --- a/lib/src/core/implementation/servient.dart +++ b/lib/src/core/implementation/servient.dart @@ -107,13 +107,18 @@ class InternalServient implements Servient { return WoT(this); } - @override - Future start() async { + Future _startServers() async { final serverStatuses = _servers .map((server) => server.start(_serverSecurityCallback)) .toList(growable: false); await Future.wait(serverStatuses); + } + + @override + Future start() async { + await _startServers(); + return startClientFactories(); }