diff options
author | Keuin <[email protected]> | 2022-03-27 22:41:17 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2022-03-28 00:11:45 +0800 |
commit | ab4b8903ee9b009c3e1a188f1cfe09e39272d2ee (patch) | |
tree | 47ae9f9fcede53722a7761db00c0bec462aad1c5 /src/bot.rs | |
parent | c4d5507e9c0b16b0d34df9e871be1d76d296ecea (diff) |
Close database gracefully when shutting down.
Diffstat (limited to 'src/bot.rs')
-rw-r--r-- | src/bot.rs | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -58,6 +58,6 @@ pub async fn repl(bot: Bot, db: Arc<database::DbPool>) { teloxide::repls2::commands_repl( bot.auto_send(), move |bot, msg, cmd| - answer(bot, msg, cmd, Arc::clone(&db)), Command::ty(), + answer(bot, msg, cmd, db.clone()), Command::ty(), ).await; } |