Commit crimson_penguin patch.
When no connection is established, the server is busy waiting and hogs the cpu. Force it to sleep at least 1s when all the data have been sent and received. It may be a bit overkill, let's just wait for complaints if it is.
This commit is contained in:
parent
8b09eb26c4
commit
953854a7a4
1 changed files with 1 additions and 0 deletions
|
@ -49,6 +49,7 @@ campaign_server::campaign_server(const std::string& cfgfile)
|
|||
void campaign_server::run()
|
||||
{
|
||||
for(;;) {
|
||||
SDL_Delay(1000);
|
||||
try {
|
||||
network::process_send_queue();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue