From 42f176e1ec32a127a249fe39879fb362ff937c48 Mon Sep 17 00:00:00 2001 From: ahrenholz Date: Mon, 28 Jul 2014 17:49:42 +0000 Subject: [PATCH] write local address, port for slave servers in /tmp/pycore.nnnnn/servers file fixes bug #248 (Boeing r1856) --- daemon/core/broker.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/daemon/core/broker.py b/daemon/core/broker.py index 96865a50..23cb5623 100644 --- a/daemon/core/broker.py +++ b/daemon/core/broker.py @@ -832,7 +832,11 @@ class CoreBroker(ConfigurableManager): if name == "localhost": continue (host, port, sock) = self.servers[name] - f.write("%s %s %s\n" % (name, host, port)) + try: + (lhost, lport) = sock.getsockname() + except: + lhost, lport = None, None + f.write("%s %s %s %s %s\n" % (name, host, port, lhost, lport)) f.close() except Exception, e: self.session.warn("Error writing server list to the file: %s\n%s" \