[service] make sure synchronous call_service has a cnxset
Fixes regression in 3.16.2 (closes #2807720)
--- a/server/repository.py Tue Apr 09 11:56:27 2013 +0200
+++ b/server/repository.py Tue Apr 09 14:23:24 2013 +0200
@@ -898,8 +898,12 @@
self.threaded_task(task)
else:
self.info('calling service %s synchronously', regid)
- service = session.vreg['services'].select(regid, session, **kwargs)
- return service.call(**kwargs)
+ session.set_cnxset()
+ try:
+ service = session.vreg['services'].select(regid, session, **kwargs)
+ return service.call(**kwargs)
+ finally:
+ session.free_cnxset()
def user_info(self, sessionid, props=None):
"""this method should be used by client to: