add log of IP in authorize

This commit is contained in:
Alan Penner 2014-01-26 20:33:08 -08:00
parent 62befe0168
commit 06e2d03a9c

View File

@ -90,6 +90,8 @@ class MiningService(GenericService):
Interfaces.worker_manager.worker_log['authorized'][worker_name] = (0, 0, False, session['difficulty'], is_ext_diff, Interfaces.timestamper.time())
return True
else:
ip = self.connection_ref()._get_ip()
log.info("Failed worker authorization: IP %s", str(ip))
if worker_name in session['authorized']:
del session['authorized'][worker_name]
if worker_name in Interfaces.worker_manager.worker_log['authorized']: