Explorar o código

* Delay writing userfile by 3 seconds to allow for better bursts and user change floods

Bryan Drewery %!s(int64=14) %!d(string=hai) anos
pai
achega
8791270812
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  1. 6 1
      src/userrec.c

+ 6 - 1
src/userrec.c

@@ -514,7 +514,12 @@ int write_userfile(int idx) {
     return real_write_userfile(idx);
   }
 
-  ++do_write_userfile;
+  if (!do_write_userfile) {
+    do_write_userfile = 3;
+  } else {
+    ++do_write_userfile;
+  }
+
   return 0;
 }