예제 #1
0
	def controller(self, handler):
		while 1:
			try:
				data, route = handler.sock.recv()
				handler.handle(data, route)
			except Exception as e:
				if not is_socket_related_error(e):
					self.print_trace(handler.sock)
				self.attempt_graceful_close(handler, handler.sock)
				_thread.exit()
예제 #2
0
파일: Wallaby.py 프로젝트: robot0nfire/fl0w
	def start(self):
		self.sync.start()
		while 1 and self.connected:
			data = self.sock.recv()
			try:
				if data[1] in self.routes:
					self.routes[data[1]].run(data[0], self)
			except Exception as e:
				if not is_socket_related_error(e):
					capture_trace()
				break