Skip to content

Commit

Permalink
refactor(servient): move server starting code into private method
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Oct 23, 2024
1 parent 96e576a commit a8f519f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/src/core/implementation/servient.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,18 @@ class InternalServient implements Servient {
return WoT(this);
}

@override
Future<WoT> start() async {
Future<void> _startServers() async {
final serverStatuses = _servers
.map((server) => server.start(_serverSecurityCallback))
.toList(growable: false);

await Future.wait(serverStatuses);
}

@override
Future<WoT> start() async {
await _startServers();

return startClientFactories();
}

Expand Down

0 comments on commit a8f519f

Please sign in to comment.