Trivial: do not stop None rpcserver
Change-Id: I58480afc9bc27fabf933c9c9d8be8e15aaba0ee8
This commit is contained in:
parent
2ff7f553c0
commit
0ca0383ba4
@ -68,8 +68,9 @@ class RPCService(service.Service):
|
||||
|
||||
def stop(self):
|
||||
try:
|
||||
self.rpcserver.stop()
|
||||
self.rpcserver.wait()
|
||||
if self.rpcserver is not None:
|
||||
self.rpcserver.stop()
|
||||
self.rpcserver.wait()
|
||||
except Exception as e:
|
||||
LOG.exception('Service error occurred when stopping the '
|
||||
'RPC server. Error: %s', e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user