forked from shaba/openuds
Replaced REST listener address to listen on 0.0.0.0 so we do not need to
reassing listener on case of ip change of VM.
This commit is contained in:
parent
a07f1d5b24
commit
1f6279cd46
@ -34,7 +34,7 @@ from __future__ import unicode_literals
|
||||
# On centos, old six release does not includes byte2int, nor six.PY2
|
||||
import six
|
||||
|
||||
VERSION = '2.0.0'
|
||||
VERSION = '2.1.0'
|
||||
|
||||
__title__ = 'udsactor'
|
||||
__version__ = VERSION
|
||||
|
@ -210,9 +210,9 @@ class CommonService(object):
|
||||
self.knownIps = dict(((v.mac, v.ip) for v in netInfo))
|
||||
|
||||
# And notify new listening address to broker
|
||||
address = (self.knownIps[self.api.mac], random.randrange(43900, 44000))
|
||||
# address = (self.knownIps[self.api.mac], random.randrange(43900, 44000))
|
||||
# And new listening address
|
||||
self.httpServer.restart(address)
|
||||
# self.httpServer.restart(address)
|
||||
# sends notification
|
||||
self.api.notifyComm(self.httpServer.getServerUrl())
|
||||
|
||||
@ -252,7 +252,8 @@ class CommonService(object):
|
||||
self.ipc.start()
|
||||
|
||||
if self.api.mac in self.knownIps:
|
||||
address = (self.knownIps[self.api.mac], random.randrange(43900, 44000))
|
||||
# address = (self.knownIps[self.api.mac], random.randrange(43900, 44000))
|
||||
address = ('0.0.0.0', random.randrange(43900, 44000))
|
||||
logger.info('Starting REST listener at {}'.format(address))
|
||||
self.httpServer = httpserver.HTTPServerThread(address, self)
|
||||
self.httpServer.start()
|
||||
|
Loading…
Reference in New Issue
Block a user