Implement suggested fix for cmdrate limiter. Resolves #1231.
This commit is contained in:
parent
d301ddd921
commit
86e0db7ea9
1 changed files with 1 additions and 1 deletions
|
|
@ -365,7 +365,7 @@ class PortalSessionHandler(SessionHandler):
|
||||||
pass
|
pass
|
||||||
if session:
|
if session:
|
||||||
now = time.time()
|
now = time.time()
|
||||||
if self.command_counter > _MAX_COMMAND_RATE:
|
if self.command_counter > _MAX_COMMAND_RATE > 0:
|
||||||
# data throttle (anti DoS measure)
|
# data throttle (anti DoS measure)
|
||||||
dT = now - self.command_counter_reset
|
dT = now - self.command_counter_reset
|
||||||
self.command_counter = 0
|
self.command_counter = 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue