Fix large future
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
9a3c52aa75
commit
6e50b07bf5
1 changed files with 2 additions and 1 deletions
|
@ -81,7 +81,8 @@ async fn handle_event(event: AdminRoomEvent, admin_room: OwnedRoomId, server_use
|
|||
let (mut message_content, reply) = match event {
|
||||
AdminRoomEvent::SendMessage(content) => (content, None),
|
||||
AdminRoomEvent::ProcessMessage(room_message, reply_id) => {
|
||||
(process_admin_message(room_message).await, Some(reply_id))
|
||||
// This future is ~8 KiB so it's better to start it off the stack.
|
||||
(Box::pin(process_admin_message(room_message)).await, Some(reply_id))
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue