diff --git a/src/database/db.rs b/src/database/db.rs index 240274b..7bc6fe9 100644 --- a/src/database/db.rs +++ b/src/database/db.rs @@ -13,8 +13,10 @@ pub struct Db(pub Connection); impl Db { /// Open the database pub fn open>(path: P) -> RudeResult { + // open the database let connection = try_log!(Connection::open(path), "Unable to open database"); + // make sure the connected_players table is cleared out { let mut statement = try_log!( connection.prepare("delete from connected_players;"),