From d73133267b6a819d9f06de82e9302180d95b6f5e Mon Sep 17 00:00:00 2001 From: chengdu <3281328128@qq.com> Date: Sat, 13 Jul 2019 18:13:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E9=97=AD=20socket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/csource/fastdfs/FdfsTest.java | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/test/java/org/csource/fastdfs/FdfsTest.java b/src/test/java/org/csource/fastdfs/FdfsTest.java index 76645e9..5dae203 100644 --- a/src/test/java/org/csource/fastdfs/FdfsTest.java +++ b/src/test/java/org/csource/fastdfs/FdfsTest.java @@ -36,20 +36,19 @@ public class FdfsTest { storageClient = new StorageClient(trackerServer, storageServer); } -// @After -// public void closeClient() { -// LOGGER.info("close connection"); -// if(trackerServer != null){ -// try { -// trackerServer.close(); -// trackerServer.finalize(); -// }catch (Exception e){ -// e.printStackTrace(); -// }catch (Throwable e){ -// e.printStackTrace(); -// } -// } -// } + @After + public void closeClient() { + LOGGER.info("close connection"); + if(trackerServer != null){ + try { + trackerServer.finalize(); + }catch (Exception e){ + e.printStackTrace(); + }catch (Throwable e){ + e.printStackTrace(); + } + } + } public void writeByteToFile(byte[] fbyte, String fileName) throws IOException { BufferedOutputStream bos = null;