Skip to content

Commit 7e3029a

Browse files
committed
1 parent 39a0092 commit 7e3029a

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

src/configure/mod.rs

+10-12
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ mod server_params;
77

88
use anyhow::{bail, ensure, Context as _, Result};
99
use async_std::prelude::*;
10-
use async_std::task;
10+
//use async_std::task;
1111
use itertools::Itertools;
1212
use job::Action;
1313
use percent_encoding::{utf8_percent_encode, NON_ALPHANUMERIC};
@@ -163,8 +163,8 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
163163
DC_LP_AUTH_NORMAL as i32
164164
};
165165

166-
let ctx2 = ctx.clone();
167-
let update_device_chats_handle = task::spawn(async move { ctx2.update_device_chats().await });
166+
//let ctx2 = ctx.clone();
167+
//let update_device_chats_handle = task::spawn(async move { ctx2.update_device_chats().await });
168168

169169
// Step 1: Load the parameters and check email-address and password
170170

@@ -258,7 +258,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
258258
.cloned()
259259
.collect();
260260

261-
let smtp_config_task = task::spawn(async move {
261+
//let smtp_config_task = task::spawn(async move {
262262
let mut smtp_configured = false;
263263
let mut errors = Vec::new();
264264
for smtp_server in smtp_servers {
@@ -278,12 +278,10 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
278278
}
279279
}
280280

281-
if smtp_configured {
282-
Ok(smtp_param)
283-
} else {
284-
Err(errors)
281+
if !smtp_configured {
282+
bail!(nicer_configuration_error(ctx, errors).await);
285283
}
286-
});
284+
//});
287285

288286
progress!(ctx, 600);
289287

@@ -323,14 +321,14 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
323321
progress!(ctx, 850);
324322

325323
// Wait for SMTP configuration
326-
match smtp_config_task.await {
324+
/*match smtp_config_task.await {
327325
Ok(smtp_param) => {
328326
param.smtp = smtp_param;
329327
}
330328
Err(errors) => {
331329
bail!(nicer_configuration_error(ctx, errors).await);
332330
}
333-
}
331+
}*/
334332

335333
progress!(ctx, 900);
336334

@@ -364,7 +362,7 @@ async fn configure(ctx: &Context, param: &mut LoginParam) -> Result<()> {
364362
.await;
365363

366364
progress!(ctx, 940);
367-
update_device_chats_handle.await?;
365+
//update_device_chats_handle.await?;
368366

369367
Ok(())
370368
}

0 commit comments

Comments
 (0)