BufferedReader.readLine()遇见的坑_bufferedreader.readline()卡住-CSDN博客
socket流读取read阻塞和readLine阻塞问题解决方案 - 士三刀 - 博客园 (cnblogs.com)
BufferedReader的readLine方法阻塞的处理 (crystalchen.github.io)
while((mes = bufferedReader.readLine()) != null) {
System.out.println(mes);
}
改为:
while((mes = bufferedReader.readLine()) != null) {
if(mes.isEmpty())
break;
System.out.println(mes);
}