Skip to content

Commit 37fed74

Browse files
committed
Update main.rs
1 parent af31e6e commit 37fed74

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

src/main.rs

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,31 @@ fn main() {
3434
});
3535
});
3636

37-
let mail_handle = thread::Builder::new()
38-
.name("mail_server".to_string())
39-
.spawn(|| {
40-
println!("Mail Server has been enabled");
41-
status_upload();
42-
println!("Mail Server has been disabled");
43-
});
44-
4537
if setup_handle
4638
.expect("Unable to join setup handle")
4739
.join()
4840
.is_err()
4941
{
5042
eprintln!("An error occured when tried to join setup handle");
51-
} else if mail_handle
52-
.expect("Unable to join mail handle")
53-
.join()
54-
.is_err()
55-
{
56-
eprintln!("An error occured when tried to join mail handle");
5743
}
5844
// Please consider adding `else if` blocks until all handles won't be joined
5945
else {
60-
println!("All config components are OK, loading the server..");
46+
let mail_handle = thread::Builder::new()
47+
.name("mail_server".to_string())
48+
.spawn(|| {
49+
println!("Mail Server has been enabled");
50+
status_upload();
51+
println!("Mail Server has been disabled");
52+
});
53+
if mail_handle
54+
.expect("Unable to join mail handle")
55+
.join()
56+
.is_err()
57+
{
58+
eprintln!("An error occured when tried to join mail handle");
59+
} else {
60+
println!("All config components are OK, loading the server..");
61+
}
6162
}
6263
/*
6364
MINECRAFT SERVER SUPPORT USING VALENCE

0 commit comments

Comments
 (0)