registration attemp

This commit is contained in:
edip 2018-11-15 09:48:16 +03:00
parent 4bec8505cd
commit a9395cc911
2 changed files with 3 additions and 9 deletions

View file

@ -162,13 +162,7 @@ class AhenkDaemon(BaseDaemon):
print("Registation attemp")
max_attempt_number -= 1
self.logger.debug('Ahenk is not registered. Attempting for registration')
#registration.registration_request()
if registration.registration_request() == False:
if max_attempt_number < 0:
self.registration_failed()
else:
registration.registration_request()
registration.registration_request()
#if max_attempt_number < 0:
# self.logger.warning('Number of Attempting for registration is over')

View file

@ -120,8 +120,8 @@ class AnonymousMessenger(ClientXMPP):
self.logger.info('Disconnecting...')
self.disconnect()
self.logger.info('Rebooting...')
System.Process.kill_by_pid(int(System.Ahenk.get_pid_number()))
sys.exit(2)
#System.Process.kill_by_pid(int(System.Ahenk.get_pid_number()))
#sys.exit(2)
Util.shutdown();
except Exception as e: