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 93df9aa commit 9442e59
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 @@ -108,13 +108,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 9442e59

Please sign in to comment.