#
Junjie
2025-07-14 471d7b5bc4c8cf7ffeb258f208a66cca202d64de
src/main/java/com/zy/core/thread/impl/NyShuttleThread.java
@@ -108,10 +108,20 @@
            writer.flush();
//            System.out.println("Sent message to server: " + JSON.toJSONString(httpCommand));
        }catch (SocketException e) {
            this.socket = null;
            e.printStackTrace();
            closeSocket();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
    private void closeSocket() {
        try {
            this.socket.close();
        } catch (Exception e1) {
        }finally {
            this.socket = null;
        }
    }
@@ -200,6 +210,7 @@
            }
        } catch (Exception e) {
//            e.printStackTrace();
            closeSocket();
        }
    }
@@ -336,4 +347,8 @@
        this.stopThread = true;
    }
    @Override
    public Socket getSocket() {
        return this.socket;
    }
}