diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-04-24 16:23:54 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-04-24 16:23:54 +0000 |
commit | f8b1a55d842f2beef4823b825552ff440b80c655 (patch) | |
tree | 7b8366a4cd81be34ab736798de9d97b3084222e4 /src/lib/Logger.py | |
parent | aef42921437ebc85357e378e87706141303405d3 (diff) | |
download | bcfg2-f8b1a55d842f2beef4823b825552ff440b80c655.tar.gz bcfg2-f8b1a55d842f2beef4823b825552ff440b80c655.tar.bz2 bcfg2-f8b1a55d842f2beef4823b825552ff440b80c655.zip |
Logging: Fix reconnect when using /dev/log
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5177 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Logger.py')
-rw-r--r-- | src/lib/Logger.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/Logger.py b/src/lib/Logger.py index 129d10314..db4c4dd09 100644 --- a/src/lib/Logger.py +++ b/src/lib/Logger.py @@ -125,13 +125,13 @@ class FragmentingSysLogHandler(logging.handlers.SysLogHandler): try: self.socket.send(msg) except socket.error: - while True: + for i in xrange(10): try: if isinstance(self.address, tuple): self.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) + self.socket.connect(self.address) else: - self.socket = socket.socket(socket.AF_UNIX, socket.SOCK_DGRAM) - self.socket.connect(self.address) + self._connect_unixsocket(self.address) break except socket.error: continue |