ipc: Fix exception handling on AddressError.

This commit is contained in:
Florian Bruhin 2015-09-03 23:13:55 +02:00
parent a6b9d28b96
commit fab6e2eafc

View File

@ -345,10 +345,13 @@ def send_or_listen(args):
# This could be a race condition...
log.init.debug("Got AddressInUseError, trying again.")
time.sleep(0.5)
sent = send_to_running_instance(socketname, args.command)
if sent:
return None
else:
try:
sent = send_to_running_instance(socketname, args.command)
if sent:
return None
else:
raise e
except Error as e:
display_error(e, args)
raise
except Error as e: