From 874368cdfc391a3eec7f88fab928ea823fafd150 Mon Sep 17 00:00:00 2001 From: PBW99 Date: Thu, 26 Oct 2023 09:15:51 +0900 Subject: [PATCH] fix: handle disconnection --- client/python/gamium/gamium/tcp_gamium_service.py | 1 + 1 file changed, 1 insertion(+) diff --git a/client/python/gamium/gamium/tcp_gamium_service.py b/client/python/gamium/gamium/tcp_gamium_service.py index 7bd98d8..f0ad96c 100644 --- a/client/python/gamium/gamium/tcp_gamium_service.py +++ b/client/python/gamium/gamium/tcp_gamium_service.py @@ -91,6 +91,7 @@ def request(self, packet: PacketTypes[P, R]) -> R: data = self._socket.recv(1024) if len(data) == 0: self.disconnect() + raise Exception("Connection closed") self._recv_queue.pushBuffer(data) if self._recv_queue.has(): break