Also remove the inbox queue file

master
Bob Mottram 2019-08-31 21:31:34 +01:00
parent 323e806adb
commit e2ddd3b0de
1 changed files with 3 additions and 1 deletions

View File

@ -430,7 +430,9 @@ class PubServer(BaseHTTPRequestHandler):
# Check if the queue is full
if len(self.server.inboxQueue)>=self.server.maxQueueLength:
print('Inbox queue is full. Removing oldest items.')
while len(self.server.inboxQueue) >= self.server.maxQueueLength-2:
while len(self.server.inboxQueue) >= self.server.maxQueueLength-4:
queueFilename=self.server.inboxQueue[0]
os.remove(queueFilename)
self.server.inboxQueue.pop(0)
# Convert the headers needed for signature verification to dict