diff src/bridge/bridge_constructor/dbus_frontend_template.py @ 1072:d123d61976c8

bridge (D-Bus): frontend side now use a 120 s timeout for async calls
author Goffi <goffi@goffi.org>
date Sun, 15 Jun 2014 00:18:28 +0200
parents 95758ef3faa8
children f094583732de
line wrap: on
line diff
--- a/src/bridge/bridge_constructor/dbus_frontend_template.py	Sat Jun 14 17:26:22 2014 +0200
+++ b/src/bridge/bridge_constructor/dbus_frontend_template.py	Sun Jun 15 00:18:28 2014 +0200
@@ -32,6 +32,7 @@
 const_OBJ_PATH = '/org/goffi/SAT/bridge'
 const_CORE_SUFFIX = ".core"
 const_PLUGIN_SUFFIX = ".plugin"
+const_TIMEOUT = 120
 
 
 def dbus_to_bridge_exception(dbus_e):
@@ -100,6 +101,7 @@
                 method = getattr(self.db_plugin_iface, name)
 
                 if async:
+                    kwargs['timeout'] = const_TIMEOUT
                     kwargs['reply_handler'] = _callback
                     kwargs['error_handler'] = lambda err: _errback(dbus_to_bridge_exception(err))