queue items may have already been removed by inbox thread

merge-requests/6/head
Bob Mottram 2019-11-16 09:57:51 +00:00
parent 72cfda3f9d
commit c522ca1d99
1 changed files with 4 additions and 1 deletions

View File

@ -736,7 +736,10 @@ class PubServer(BaseHTTPRequestHandler):
while len(self.server.inboxQueue) >= self.server.maxQueueLength-4:
queueFilename=self.server.inboxQueue[0]
if os.path.isfile(queueFilename):
os.remove(queueFilename)
try:
os.remove(queueFilename)
except:
pass
self.server.inboxQueue.pop(0)
timeDiff=str(int((time.time()-cleardownStartTime)*1000))
print('Inbox cleardown took '+timeDiff+' mS')