Minor bug fix to API

This commit is contained in:
usmannasir
2018-07-19 22:38:37 +05:00
parent e29eac1257
commit a83686e39c
22 changed files with 507 additions and 96 deletions

View File

@@ -50,13 +50,16 @@ class SetupConn:
try:
self.sock.listen(5)
while True:
# Wait for a connection
if os.path.exists(SetupConn.cleaningPath):
readFromFile = open(SetupConn.cleaningPath, 'r')
command = readFromFile.read()
cacheManager.handlePurgeRequest(command)
readFromFile.close()
os.remove(SetupConn.cleaningPath)
try:
# Wait for a connection
if os.path.exists(SetupConn.cleaningPath):
readFromFile = open(SetupConn.cleaningPath, 'r')
command = readFromFile.read()
cacheManager.handlePurgeRequest(command)
readFromFile.close()
os.remove(SetupConn.cleaningPath)
except:
pass
connection, client_address = self.sock.accept()
background = handle.HandleRequest(connection)