Index: debian/control =================================================================== --- debian/control (Revision 21497) +++ debian/control (Arbeitskopie) @@ -49,7 +49,6 @@ Alive Events while the DVS Session is open. Via HTTPS it listens for commands issued by the Sessionbroker. - Package: univention-thin-client-dvs-client Architecture: all Depends: rdesktop, @@ -79,4 +78,3 @@ Description: UCS DVS Webaccess This package provides the Webaccess html for UCS DVS. Primarily intended for installation on an xrdp server. - Index: debian/changelog =================================================================== --- debian/changelog (Revision 21497) +++ debian/changelog (Arbeitskopie) @@ -1,3 +1,10 @@ +univention-dvs-sessionbroker (0.4.3-2) unstable; urgency=low + + * Fix exception on broken pipe (Bug #19943) + * Fix session not resuming. + + -- Philipp Hahn Wed, 15 Dec 2010 11:28:41 +0100 + univention-dvs-sessionbroker (0.4.3-1) unstable; urgency=low * remove workaround for Bug #20924 Index: univention-dvs-sessionbroker-client =================================================================== --- univention-dvs-sessionbroker-client (Revision 21497) +++ univention-dvs-sessionbroker-client (Arbeitskopie) @@ -283,7 +283,7 @@ # Reconnect after closing current (defunc) connection try: conn2 - except: + except NameError: conn2 = httplib.HTTPSConnection(options.sessionbrokerhost, options.port) conn2.auto_open = False conn2.connect() @@ -295,7 +295,14 @@ log(2, 'alive event server response %d: %s\n' % (response.status, body)) if response.status == httplib.OK: # 200 continue + elif response.status == httplib.REQUEST_TIMEOUT: # 408 + log(0, 'timeout sending alive event, retrying') + continue + elif response.status == httplib.BAD_REQUEST: # 400 + log(0, 'session invalidated by session broker, terminating') + terminate() else: + log(0, 'Unhandled error code %d, terminating' % response.status) terminate() except httplib.BadStatusLine: log(0, 'connection closed while receiving alive event') @@ -318,6 +325,8 @@ body = response.read() except httplib.CannotSendRequest: pass + except socket.error, (err, errstr): + pass conn2.close() Index: univention-dvs-sessionbroker =================================================================== --- univention-dvs-sessionbroker (Revision 21497) +++ univention-dvs-sessionbroker (Arbeitskopie) @@ -451,8 +451,8 @@ if status == SESSION_STATUS_SILENT: logger.info(_("Resuming session %s") % session_id) ## periodic alive event - query = "UPDATE sessions SET expires=DATE_ADD(now(),INTERVAL %s SECOND) WHERE session_id=%s" - values = (2*update_interval, session_id) + query = "UPDATE sessions SET expires=DATE_ADD(now(),INTERVAL %s SECOND), status=%s WHERE session_id=%s" + values = (2*update_interval, SESSION_STATUS_ACTIVE, session_id) rows = cursor.execute(query, values) if rows != 1: logger.warning(query % values)