diff --git a/matrix_sdk/src/client.rs b/matrix_sdk/src/client.rs index 55c2d078..d65f7b1d 100644 --- a/matrix_sdk/src/client.rs +++ b/matrix_sdk/src/client.rs @@ -2123,7 +2123,7 @@ impl Client { }; for notification in room_notifications { - (handler)(notification.clone(), room.clone(), self.clone()).await; + tokio::spawn((handler)(notification.clone(), room.clone(), self.clone())); } } } diff --git a/matrix_sdk/src/event_handler.rs b/matrix_sdk/src/event_handler.rs index b569f59c..43df38c5 100644 --- a/matrix_sdk/src/event_handler.rs +++ b/matrix_sdk/src/event_handler.rs @@ -300,7 +300,7 @@ impl Client { room: room.clone(), raw: event.json(), }; - (handler)(data).await; + tokio::spawn((handler)(data)); } } }