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

Commit 7f3e7d0

Browse files
committed
v0.4.0
1 parent c163bf4 commit 7f3e7d0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ async fn main() -> std::io::Result<()> {
6565
.failed("Invalid configuration file");
6666

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

94+
// Spawn scheduled directory queries
95+
for schedule in directory.schedules {
96+
schedule.spawn(shutdown_rx.clone());
97+
}
98+
9499
// Wait for shutdown signal
95100
wait_for_shutdown(&format!(
96101
"Shutting down Stalwart SMTP Server v{}...",

0 commit comments

Comments
 (0)