txlyre 2 жил өмнө
parent
commit
9db0cdec05
1 өөрчлөгдсөн 3 нэмэгдсэн , 3 устгасан
  1. 3 3
      byafn.py

+ 3 - 3
byafn.py

@@ -41,7 +41,7 @@ MAX_DISTANCE      = 8
 MAX_PAYLOAD_SIZE  = 1024*1024*64
 CHUNK_SIZE        = 512
 
-RATELIMIT         = 0.3
+RATELIMIT         = 0.25
 
 config = {}
 
@@ -218,7 +218,7 @@ async def send(peer, message):
     async with peer.send_lock:
       await write(peer, buffer)
 
-      await asyncio.sleep(RATELIMIT)
+      await asyncio.sleep(RATELIMIT*2)
 
     return
 
@@ -253,7 +253,7 @@ async def send(peer, message):
           chunk
         )
 
-    await asyncio.sleep(RATELIMIT)
+    await asyncio.sleep(RATELIMIT*2)
 
 async def receive(peer):
   async with peer.receive_lock: