Commit 492aa28e27
Unsigned
Layout: unified · split
src/connection.rs +10 −2
| @@ -428,8 +428,9 @@ impl Connection { | ||
| 428 | 428 | |
| 429 | 429 | let client_ref = &client; |
| 430 | 430 | |
| 431 | let _ret = client | |
| 432 | .sync_with_callback(sync_settings, |response| async move { | |
| 431 | loop { | |
| 432 | let ret = client | |
| 433 | .sync_with_callback(sync_settings.clone(), |response| async move { | |
| 433 | 434 | for (room_id, room) in response.rooms.join { |
| 434 | 435 | for event in |
| 435 | 436 | room.state.iter().filter_map(|e| e.deserialize().ok()) |
| @@ -543,5 +544,12 @@ impl Connection { | ||
| 543 | 544 | LoopCtrl::Continue |
| 544 | 545 | }) |
| 545 | 546 | .await; |
| 547 | ||
| 548 | if let Err(err) = ret { | |
| 549 | error!("Matrix sync failed: {err}"); | |
| 550 | } else { | |
| 551 | break; | |
| 552 | } | |
| 553 | } | |
| 546 | 554 | } |
| 547 | 555 | } |