clearly exit early, or setup logger
@@ -1051,10 +1051,11 @@ impl GooseAttack {
// A channel used by GooseClients to send logs.
Option<mpsc::UnboundedSender<Option<GooseDebug>>>,
) {
+ // If the logger isn't configured, return immediately.
if self.configuration.debug_log_file.is_empty() {
- // Logger is not configured, return immediately.
- (None, None)
- } else {
+ return (None, None);
+ }
+
// Create an unbounded channel allowing GooseUser threads to log errors.
let (all_threads_logger, logger_receiver): (
mpsc::UnboundedSender<Option<GooseDebug>>,
@@ -1067,7 +1068,6 @@ impl GooseAttack {
));
(Some(logger_thread), Some(all_threads_logger))
}
- }
/// Called internally in local-mode and gaggle-mode.
async fn launch_users(
