From 3ec3bd545335238ecb166477f9b4d1bf701013ee Mon Sep 17 00:00:00 2001 From: whyclxw <810412026@qq.com> Date: 星期日, 27 四月 2025 13:42:42 +0800 Subject: [PATCH] socket提交 --- src/main/java/com/whyc/webSocket/StationInfSocket.java | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/whyc/webSocket/StationInfSocket.java b/src/main/java/com/whyc/webSocket/StationInfSocket.java index 6d8d5a3..1b0678a 100644 --- a/src/main/java/com/whyc/webSocket/StationInfSocket.java +++ b/src/main/java/com/whyc/webSocket/StationInfSocket.java @@ -52,13 +52,10 @@ @Override public void run() { try { - while (!currentThread().isInterrupted()) { - while (!currentThread().isInterrupted()) { - Response res = stationService.getLeftStation(userId); - session.getBasicRemote().sendObject(res); - sleep(5000); - } + Response res = stationService.getLeftStation(userId); + session.getBasicRemote().sendObject(res); + sleep(5000); } } catch (Exception e) { this.interrupt(); -- Gitblit v1.9.1