Skip to content

Commit 3336d69

Browse files
authored
[AINode] Fix cannot be stopped by the stop script (#17020)
1 parent 337ac47 commit 3336d69

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

iotdb-core/ainode/iotdb/ainode/core/ai_node.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,4 @@ def stop(self):
161161
if not self._stop_event.is_set():
162162
self._stop_event.set()
163163
self._rpc_handler.stop()
164-
if self._rpc_service:
165-
self._rpc_service.stop()
166-
for retry in range(30):
167-
self._rpc_service.join(2)
168-
if not self._rpc_service.is_alive():
169-
logger.warning(
170-
"RPC service thread failed to stop in time, retrying..."
171-
)
172-
break
173-
logger.info("IoTDB-AINode has successfully stopped.")
164+
self._rpc_service.stop()

iotdb-core/ainode/iotdb/ainode/core/rpc/service.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def serve(self) -> None:
4949
self.serverTransport.listen()
5050
while not self._stop_event.is_set():
5151
try:
52-
client = self.serverTransport.accept() # TODO: Fix the block problem
52+
client = self.serverTransport.accept()
5353
if not client:
5454
continue
5555
self.clients.put(client)

0 commit comments

Comments
 (0)