Skip to content
This repository has been archived by the owner on Oct 8, 2024. It is now read-only.

Commit

Permalink
v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mdecimus committed Oct 25, 2023
1 parent c163bf4 commit 7f3e7d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ async fn main() -> std::io::Result<()> {
.failed("Invalid configuration file");

// Spawn servers
let shutdown_tx = servers.spawn(|server, shutdown_rx| {
let (shutdown_tx, shutdown_rx) = servers.spawn(|server, shutdown_rx| {
match &server.protocol {
ServerProtocol::Smtp | ServerProtocol::Lmtp => {
server.spawn(SmtpSessionManager::new(smtp.clone()), shutdown_rx)
Expand All @@ -91,6 +91,11 @@ async fn main() -> std::io::Result<()> {
};
});

// Spawn scheduled directory queries
for schedule in directory.schedules {
schedule.spawn(shutdown_rx.clone());
}

// Wait for shutdown signal
wait_for_shutdown(&format!(
"Shutting down Stalwart SMTP Server v{}...",
Expand Down

0 comments on commit 7f3e7d0

Please sign in to comment.