View | Details | Raw Unified | Return to bug 36561
Collapse All | Expand All

(-)a/ucs-4.0-0/management/univention-management-console/src/univention/management/console/protocol/modserver.py (-7 / +7 lines)
 Lines 145-167   class ModuleServer(Server): Link Here 
145
		self.__client = client
145
		self.__client = client
146
		notifier.socket_add(self.__comm, self._recv)
146
		notifier.socket_add(self.__comm, self._recv)
147
147
148
	def _recv(self, socket):
148
	def _recv(self, sock):
149
		try:
149
		try:
150
			data = socket.recv(RECV_BUFFER_SIZE)
150
			data = sock.recv(RECV_BUFFER_SIZE)
151
		except socket.error, ex:
151
		except socket.error as exc:
152
			MODULE.error('Failed connection: %s' % (errno.errorcode.get(ex.errno, ex.errno),))
152
			MODULE.error('Failed connection: %s' % (errno.errorcode.get(exc.errno, exc.errno),))
153
			data = None
153
			data = None
154
154
155
		# connection closed?
155
		# connection closed?
156
		if not data:
156
		if not data:
157
			socket.close()
157
			sock.close()
158
			if socket == self.__comm:
158
			if sock == self.__comm:
159
				MODULE.info('UMC server connection closed. This module is no longer in use.')
159
				MODULE.info('UMC server connection closed. This module is no longer in use.')
160
				# the connection to UMC server connection has been closed/died/...
160
				# the connection to UMC server connection has been closed/died/...
161
				# so from now on this module is unused. Thus it is committing suicide right now.
161
				# so from now on this module is unused. Thus it is committing suicide right now.
162
				self._timed_out()
162
				self._timed_out()
163
			else:
163
			else:
164
				MODULE.info('Connection %r closed' % (socket,))
164
				MODULE.info('Connection %r closed' % (sock,))
165
			# remove socket from notifier
165
			# remove socket from notifier
166
			return False
166
			return False
167
167

Return to bug 36561