5059: Don't print the first "Waiting for score threads to complete" r=def- a=heinrich5991

Looks nicer IMO if you don't show the message if there's no actual
waiting.

## Checklist

- [x] Tested the change ingame
- [ ] Provided screenshots if it is a visual change
- [ ] Tested in combination with possibly related configuration options
- [ ] Written a unit test if it works standalone, system.c especially
- [ ] Considered possible null pointers and out of bounds array indexing
- [ ] Changed no physics that affect existing maps
- [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional)


Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
This commit is contained in:
bors[bot] 2022-05-01 09:48:56 +00:00 committed by GitHub
commit ea0884f8d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -109,8 +109,10 @@ void CDbConnectionPool::OnShutdown()
while(m_Shutdown.load())
{
// print a log about every two seconds
if(i % 20 == 0)
dbg_msg("sql", "Waiting for score-threads to complete (%ds)", i / 10);
if(i % 20 == 0 && i > 0)
{
dbg_msg("sql", "Waiting for score threads to complete (%ds)", i / 10);
}
++i;
thread_sleep(100000);
}