sourcebans-pp
sourcebans-pp copied to clipboard
feat(sql): Prevent deadlock
Remove unnecessary database locking in InitializeBackupDB
Description
Removed unnecessary database locking in the InitializeBackupDB function since all SQL queries are executed asynchronously.
Motivation and Context
The database locking was unnecessary because:
- All SQL queries in SourceBans++ are executed asynchronously
- The table creation is a one-time operation that occurs at plugin startup
- Database locking could potentially cause performance issues (deadlock)
- Follow the same method used in sbpp_comms
How Has This Been Tested?
- Tested on a local development server
- Verified that the SQLite queue table is still created correctly
- Confirmed that ban queue functionality works as expected
- Checked that no errors are logged during plugin startup
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
Checklist:
- [x] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have read the CONTRIBUTING document.