Skip to content

Commit

Permalink
Fixed closing the database when it is not connected
Browse files Browse the repository at this point in the history
  • Loading branch information
timosmit committed Jan 3, 2019
1 parent da4fd9d commit 9e23593
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion luamods/wolfadmin/db/db.lua
Expand Up @@ -51,7 +51,9 @@ end
events.handle("onGameInit", db.oninit)

function db.onshutdown(restartMap)
db.close(not restartMap)
if db.isConnected() then
db.close(not restartMap)
end
end
events.handle("onGameShutdown", db.onshutdown)

Expand Down

0 comments on commit 9e23593

Please sign in to comment.