keyerror bugfix and increased api timeout

This commit is contained in:
Kevin Froman 2019-01-22 14:15:02 -06:00
parent ee9023b150
commit 0302447588
2 changed files with 5 additions and 2 deletions

View File

@ -30,7 +30,7 @@ import onionrutils, onionrexceptions, onionrcrypto, blockimporter, onionrevents
class FDSafeHandler(WSGIHandler): class FDSafeHandler(WSGIHandler):
def handle(self): def handle(self):
timeout = Timeout(10, exception=Exception) timeout = Timeout(60, exception=Exception)
timeout.start() timeout.start()
#timeout = gevent.Timeout.start_new(3) #timeout = gevent.Timeout.start_new(3)

View File

@ -244,7 +244,10 @@ class OnionrCommunicatorDaemon:
continue continue
if blockHash in self._core.getBlockList(): if blockHash in self._core.getBlockList():
logger.debug('Block %s is already saved.' % (blockHash,)) logger.debug('Block %s is already saved.' % (blockHash,))
del self.blockQueue[blockHash] try:
del self.blockQueue[blockHash]
except KeyError:
pass
continue continue
if self._core._blacklist.inBlacklist(blockHash): if self._core._blacklist.inBlacklist(blockHash):
continue continue