Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/server_plugin.py
diff options
context:
space:
mode:
authorGuillaume Desmottes <cassidy@cass-wks.(none)>2007-11-14 14:17:57 (GMT)
committer Guillaume Desmottes <cassidy@cass-wks.(none)>2007-11-14 14:17:57 (GMT)
commit2f018f3606cedb76922ac59db4f37e51597fb015 (patch)
tree09ffc68a58a5066a97a0398031cf60e358667574 /src/server_plugin.py
parent655569208b20abf5eaee77d5fdede1daae09667f (diff)
Move IP4AddressMonitor object from ServerPlugin to TelepathyPlugin so we can reset the
reconnect timer when our IP is changed
Diffstat (limited to 'src/server_plugin.py')
-rw-r--r--src/server_plugin.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/server_plugin.py b/src/server_plugin.py
index ef79aaa..fa7efdf 100644
--- a/src/server_plugin.py
+++ b/src/server_plugin.py
@@ -56,16 +56,9 @@ class ServerPlugin(TelepathyPlugin):
def __init__(self, registry, owner):
TelepathyPlugin.__init__(self, registry, owner)
- # Monitor IPv4 address as an indicator of the network connection
- self._ip4am = psutils.IP4AddressMonitor.get_instance()
- self._ip4am_sigid = self._ip4am.connect('address-changed', self._ip4_address_changed_cb)
-
- def cleanup(self):
- TelepathyPlugin.cleanup(self)
- self._ip4am.disconnect(self._ip4am_sigid)
-
def _ip4_address_changed_cb(self, ip4am, address):
- _logger.debug("::: IP4 address now %s", address)
+ TelepathyPlugin._ip4_address_changed_cb(self, ip4am, address)
+
if address:
_logger.debug("::: valid IP4 address, conn_status %s" %
self._conn_status)