Skip to content

Commit

Permalink
Issue when more than 500 connections
Browse files Browse the repository at this point in the history
  • Loading branch information
elg committed Mar 23, 2023
1 parent 780277f commit 0568d38
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions passhportd/app/models_mod/target.py
Expand Up @@ -189,9 +189,10 @@ def get_lastlog(self):
if len(self.logentries) < 1:
return "{}"

for i in range(0, 500):
if i >= len(self.logentries):
i = 500
start = len(self.logentries) - 500
for i in range(start, start + 500):
if i > len(self.logentries):
i = start + 500
else:
output = output + '"' + str(i) + '": ' + \
self.logentries[i].simplejson() + ",\n"
Expand Down

0 comments on commit 0568d38

Please sign in to comment.