def finishRemove(self, client, reason='Quit'):
		if client.static or not client._protocol: return # static clients don't disconnect
		client._protocol._remove(client, reason)
		
		s = client.conn
		if s in self.socketmap: del self.socketmap[s]
		self.poller.unregister(s)
		
		try:
			s.shutdown(socket.SHUT_RDWR)
			s.close()
		except socket.error: #socket shut down by itself ;) probably got a bad file descriptor
			try:
				s.close()
			except socket.error:
				pass # in case shutdown was called but not close.
		except __HOLE__:
			pass
		
		self._root.console_write('Client disconnected from %s, session ID was %s'%(client.ip_address, client.session_id))
dataset/ETHPy150Open lunixbochs/uberserver/Dispatcher.py/Dispatcher.finishRemove